mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
fix pipeline
This commit is contained in:
parent
f5b93eb991
commit
b1cc019bd4
@ -1068,13 +1068,14 @@ void InterpreterSelectQuery::executeImpl(TPipeline & pipeline, const BlockInputS
|
|||||||
* - therefore, we merge the sorted streams from remote servers.
|
* - therefore, we merge the sorted streams from remote servers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!query_info.sorting_info) // Otherwise we have executed them while reading
|
|
||||||
executeExpression(pipeline, expressions.before_order);
|
|
||||||
|
|
||||||
if (!expressions.first_stage && !expressions.need_aggregate && !(query.group_by_with_totals && !aggregate_final))
|
if (!expressions.first_stage && !expressions.need_aggregate && !(query.group_by_with_totals && !aggregate_final))
|
||||||
executeMergeSorted(pipeline);
|
executeMergeSorted(pipeline);
|
||||||
else /// Otherwise, just sort.
|
else /// Otherwise, just sort.
|
||||||
|
{
|
||||||
|
if (!query_info.sorting_info) // Otherwise we have executed them while reading
|
||||||
|
executeExpression(pipeline, expressions.before_order);
|
||||||
executeOrder(pipeline, query_info.sorting_info);
|
executeOrder(pipeline, query_info.sorting_info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Optimization - if there are several sources and there is LIMIT, then first apply the preliminary LIMIT,
|
/** Optimization - if there are several sources and there is LIMIT, then first apply the preliminary LIMIT,
|
||||||
|
Loading…
Reference in New Issue
Block a user