提交 543afcf5 编写于 作者: A Alexey Arno

dbms: Server: More correct logic. It does not change functionality, but it...

dbms: Server: More correct logic. It does not change functionality, but it adds coherency. [#METR-14408]
上级 3a287e66
......@@ -555,9 +555,7 @@ void InterpreterSelectQuery::executeSingleQuery()
{
/// Если было более одного источника - то нужно выполнить DISTINCT ещё раз после их слияния.
if (need_second_distinct_pass)
{
executeDistinct(streams, false, Names());
}
executeLimit(streams);
}
......@@ -922,6 +920,9 @@ void InterpreterSelectQuery::executeDistinct(BlockInputStreams & streams, bool b
{
stream = new DistinctBlockInputStream(stream, settings.limits, limit_for_distinct, columns);
}
if (streams.size() > 1)
union_within_single_query = true;
}
}
......@@ -952,6 +953,7 @@ void InterpreterSelectQuery::executePreLimit(BlockInputStreams & streams)
{
stream = new LimitBlockInputStream(stream, limit_length + limit_offset, 0);
}
if (streams.size() > 1)
union_within_single_query = true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册