Remove strange code

This commit is contained in:
Alexey Milovidov 2024-07-27 03:35:25 +02:00
parent 90605127c2
commit 10dc9232a1

View File

@ -237,17 +237,6 @@ void SubstituteColumnOptimizer::perform()
const auto & compare_graph = metadata_snapshot->getConstraints().getGraph(); const auto & compare_graph = metadata_snapshot->getConstraints().getGraph();
// Fill aliases
if (select_query->select())
{
auto * list = select_query->refSelect()->as<ASTExpressionList>();
if (!list)
throw Exception(ErrorCodes::LOGICAL_ERROR, "List of selected columns must be ASTExpressionList");
for (ASTPtr & ast : list->children)
ast->setAlias(ast->getAliasOrColumnName());
}
auto run_for_all = [&](const auto func) auto run_for_all = [&](const auto func)
{ {
if (select_query->where()) if (select_query->where())