mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
fixed substitution launch condition [#CONV-6778]
This commit is contained in:
parent
c2d5749128
commit
897f03017e
@ -164,7 +164,9 @@ BlockInputStreamPtr InterpreterSelectQuery::execute()
|
||||
if (need_aggregate)
|
||||
executeAggregation(streams, expression);
|
||||
|
||||
executeOriginalColumnNameSubstitution(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