diff --git a/src/Processors/QueryPlan/Optimizations/removeRedundantOrderBy.cpp b/src/Processors/QueryPlan/Optimizations/removeRedundantOrderBy.cpp index 035e9958641..1ef86bd2f0c 100644 --- a/src/Processors/QueryPlan/Optimizations/removeRedundantOrderBy.cpp +++ b/src/Processors/QueryPlan/Optimizations/removeRedundantOrderBy.cpp @@ -33,7 +33,7 @@ struct FrameWithParent using StackWithParent = std::vector; -bool checkForStatefulFunctions(std::vector const & stack, const QueryPlan::Node * node_affect_order) +bool checkForStatefulFunctions(const StackWithParent & stack, const QueryPlan::Node * node_affect_order) { chassert(!stack.empty()); chassert(typeid_cast(stack.back().node->step.get())); diff --git a/tests/queries/0_stateless/02496_remove_redundant_order_by.sql b/tests/queries/0_stateless/02496_remove_redundant_order_by.sql index 04718ab5eeb..d735139cafc 100644 --- a/tests/queries/0_stateless/02496_remove_redundant_order_by.sql +++ b/tests/queries/0_stateless/02496_remove_redundant_order_by.sql @@ -1,6 +1,5 @@ SET allow_experimental_analyzer=1; SET optimize_duplicate_order_by_and_distinct=0; --- set query_plan_enable_optimizations=0; SELECT '-- Disable query_plan_remove_redundant_order_by'; SET query_plan_remove_redundant_order_by=0;