From 3221c7de85857bdcce2dd1c72ba84148ae161978 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 14 May 2020 16:56:17 +0300 Subject: [PATCH] fixes previous changes 2 --- src/Interpreters/InterpreterSelectQuery.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 82f34e6b2a9..f7f502dd4aa 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -959,7 +959,11 @@ void InterpreterSelectQuery::executeImpl(TPipeline & pipeline, const BlockInputS executeWhere(pipeline, expressions.before_where, expressions.remove_where_filter); if (expressions.need_aggregate) + { executeAggregation(pipeline, expressions.before_aggregation, aggregate_overflow_row, aggregate_final, query_info.input_order_info); + /// We need to reset input order info, so that executeOrder can't use it + query_info.input_order_info.reset(); + } else { executeExpression(pipeline, expressions.before_order_and_select);