mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Merge pull request #46642 from ClickHouse/remove_redundant_sorting_fix
Fix: remove redundant sorting optimization
This commit is contained in:
commit
271b72abf4
@ -188,7 +188,14 @@ private:
|
||||
return false;
|
||||
|
||||
/// remove sorting
|
||||
parent_node->children.front() = sorting_node->children.front();
|
||||
for (auto & child : parent_node->children)
|
||||
{
|
||||
if (child == sorting_node)
|
||||
{
|
||||
child = sorting_node->children.front();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// sorting removed, so need to update sorting traits for upstream steps
|
||||
const DataStream * input_stream = &parent_node->children.front()->step->getOutputStream();
|
||||
|
Loading…
Reference in New Issue
Block a user