Fixing tests.

This commit is contained in:
Nikolai Kochetov 2024-09-17 12:51:03 +00:00
parent 5589442aad
commit a3cd1ba197

View File

@ -118,7 +118,8 @@ SortingProperty applyOrder(QueryPlan::Node * parent, SortingProperty * propertie
if (auto * sorting_step = typeid_cast<SortingStep *>(parent->step.get())) if (auto * sorting_step = typeid_cast<SortingStep *>(parent->step.get()))
{ {
if (optimization_settings.optimize_sorting_by_input_stream_properties && !sorting_step->hasPartitions()) if (optimization_settings.optimize_sorting_by_input_stream_properties
&& !sorting_step->hasPartitions() && sorting_step->getType() == SortingStep::Type::Full)
{ {
auto common_prefix = commonPrefix(properties->sort_description, sorting_step->getSortDescription()); auto common_prefix = commonPrefix(properties->sort_description, sorting_step->getSortDescription());
if (!common_prefix.empty()) if (!common_prefix.empty())