mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
fixed substitution launch condition [#CONV-6778]
This commit is contained in:
parent
c2d5749128
commit
897f03017e
@ -164,6 +164,8 @@ BlockInputStreamPtr InterpreterSelectQuery::execute()
|
||||
if (need_aggregate)
|
||||
executeAggregation(streams, expression);
|
||||
|
||||
/// Подставим оригинальные имена столбцов, если запрос шел из distributed таблицы
|
||||
if (settings.sign_rewrite && to_stage == QueryProcessingStage::WithMergeableState)
|
||||
executeOriginalColumnNameSubstitution(streams, expression);
|
||||
}
|
||||
else if (from_stage <= QueryProcessingStage::WithMergeableState && to_stage > QueryProcessingStage::WithMergeableState)
|
||||
@ -585,8 +587,6 @@ BlockInputStreamPtr InterpreterSelectQuery::executeAndFormat(WriteBuffer & buf)
|
||||
|
||||
void InterpreterSelectQuery::executeOriginalColumnNameSubstitution(BlockInputStreams & streams, ExpressionPtr & expression)
|
||||
{
|
||||
if (!settings.sign_rewrite)
|
||||
return;
|
||||
for (BlockInputStreams::iterator it = streams.begin(); it != streams.end(); ++it)
|
||||
{
|
||||
BlockInputStreamPtr & stream = *it;
|
||||
|
Loading…
Reference in New Issue
Block a user