rtpsw commented on code in PR #35513: URL: https://github.com/apache/arrow/pull/35513#discussion_r1190211946
########## cpp/src/arrow/engine/substrait/function_test.cc: ########## @@ -601,6 +603,7 @@ std::shared_ptr<Table> GetOutputTableForAggregateCase( std::shared_ptr<acero::ExecPlan> PlanFromAggregateCase( const AggregateTestCase& test_case, std::shared_ptr<Table>* output_table, bool with_keys) { + static ExecContext ctx_for_ordered; Review Comment: The `static` makes the `ExecContext` instance global (and restricted to the function's scope), preventing its premature destruction. This is useful because the method it is passed to takes a pointer, rather than a `shared_ptr`, to an `ExecContext`. This instance is only used when the aggregation-case is ordered. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org