diff --git a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index c5f546a9c36..c024e5da7b5 100644 --- a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -242,7 +242,7 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read( auto sorting_step = std::make_unique( projection_plan->getCurrentDataStream(), - query_info.projection->input_order_info->order_key_prefix_descr, + query_info.projection->input_order_info->sort_description_for_merging, output_order_descr, settings.max_block_size, limit);