Update dbms/src/Interpreters/InterpreterSelectQuery.cpp

Co-Authored-By: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com>
This commit is contained in:
Anton Popov 2019-11-15 17:09:34 +03:00 committed by GitHub
parent 475356f2b7
commit 0318e6d820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2262,6 +2262,8 @@ void InterpreterSelectQuery::executeOrder(Pipeline & pipeline, InputSortingInfoP
* or reverse order of sorting key using one input stream per part
* and then merge them into one sorted stream.
* At this stage we merge per-thread streams into one.
* If the input is sorted by some prefix of the sorting key required for output,
* we have to finish sorting after the merge.
*/
bool need_finish_sorting = (input_sorting_info->order_key_prefix_descr.size() < output_order_descr.size());