Revert "Attempt to fix bad code, try 2 [#CLICKHOUSE-3649] #1830"

This reverts commit eb0095a7b9.
This commit is contained in:
Alexey Milovidov 2018-03-16 07:37:21 +03:00
parent eb0095a7b9
commit 73b04a4d27

View File

@ -1504,10 +1504,12 @@ void ExpressionAnalyzer::makeSetsForIndexImpl(const ASTPtr & node, const Block &
}
else
{
ExpressionActionsPtr temp_actions = std::make_shared<ExpressionActions>(aggregated_columns, settings);
ExpressionActionsPtr temp_actions = std::make_shared<ExpressionActions>(source_columns, settings);
getRootActions(func->arguments->children.at(0), true, false, temp_actions);
Block sample_block_with_calculated_columns = temp_actions->getSampleBlock();
makeExplicitSet(func, sample_block_with_calculated_columns, true);
if (sample_block_with_calculated_columns.has(args.children.at(0)->getColumnName()))
makeExplicitSet(func, sample_block_with_calculated_columns, true);
}
}
}