mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
Better method name
This commit is contained in:
parent
663e92b1c5
commit
254d55f2ab
@ -401,7 +401,7 @@ InterpreterCreateQuery::TableProperties InterpreterCreateQuery::setProperties(AS
|
||||
if (create.columns_list->indices)
|
||||
for (const auto & index : create.columns_list->indices->children)
|
||||
properties.indices.push_back(
|
||||
IndexDescription::getSkipIndexFromAST(index->clone(), properties.columns, context));
|
||||
IndexDescription::getIndexFromAST(index->clone(), properties.columns, context));
|
||||
|
||||
properties.constraints = getConstraintsDescription(create.columns_list->constraints);
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ void AlterCommand::apply(StorageInMemoryMetadata & metadata, const Context & con
|
||||
++insert_it;
|
||||
}
|
||||
|
||||
metadata.indices.emplace(insert_it, IndexDescription::getSkipIndexFromAST(index_decl, metadata.columns, context));
|
||||
metadata.indices.emplace(insert_it, IndexDescription::getIndexFromAST(index_decl, metadata.columns, context));
|
||||
}
|
||||
else if (type == DROP_INDEX)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace ErrorCodes
|
||||
};
|
||||
|
||||
|
||||
IndexDescription IndexDescription::getSkipIndexFromAST(const ASTPtr & definition_ast, const ColumnsDescription & columns, const Context & context)
|
||||
IndexDescription IndexDescription::getIndexFromAST(const ASTPtr & definition_ast, const ColumnsDescription & columns, const Context & context)
|
||||
{
|
||||
const auto * index_definition = definition_ast->as<ASTIndexDeclaration>();
|
||||
if (!index_definition)
|
||||
@ -103,7 +103,7 @@ IndicesDescription IndicesDescription::parse(const String & str, const ColumnsDe
|
||||
ASTPtr list = parseQuery(parser, str, 0, DBMS_DEFAULT_MAX_PARSER_DEPTH);
|
||||
|
||||
for (const auto & index : list->children)
|
||||
result.emplace_back(IndexDescription::getSkipIndexFromAST(index, columns, context));
|
||||
result.emplace_back(IndexDescription::getIndexFromAST(index, columns, context));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ struct IndexDescription
|
||||
size_t granularity;
|
||||
|
||||
/// Parse index from definition AST
|
||||
static IndexDescription getSkipIndexFromAST(const ASTPtr & definition_ast, const ColumnsDescription & columns, const Context & context);
|
||||
static IndexDescription getIndexFromAST(const ASTPtr & definition_ast, const ColumnsDescription & columns, const Context & context);
|
||||
};
|
||||
|
||||
/// All non-primary indicies for storage
|
||||
|
@ -607,7 +607,7 @@ static StoragePtr create(const StorageFactory::Arguments & args)
|
||||
|
||||
if (args.query.columns_list && args.query.columns_list->indices)
|
||||
for (auto & index : args.query.columns_list->indices->children)
|
||||
indices_description.push_back(IndexDescription::getSkipIndexFromAST(index, args.columns, args.context));
|
||||
indices_description.push_back(IndexDescription::getIndexFromAST(index, args.columns, args.context));
|
||||
|
||||
storage_settings->loadFromQuery(*args.storage_def);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user