Better method name

This commit is contained in:
alesapin 2020-06-01 15:02:36 +03:00
parent 663e92b1c5
commit 254d55f2ab
5 changed files with 6 additions and 6 deletions

View File

@ -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);
}

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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

View File

@ -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);