@@ -13,7 +13,6 @@ use datafusion::common::{
1313 DFSchema , DFSchemaRef , DataFusionError , Result , ScalarValue , Spans , TableReference , plan_err,
1414} ;
1515use datafusion:: execution:: context:: SessionState ;
16- use datafusion:: execution:: runtime_env:: RuntimeEnvBuilder ;
1716use datafusion:: functions:: datetime:: date_bin;
1817use datafusion:: logical_expr:: { Expr , Extension , LogicalPlan , UserDefinedLogicalNode } ;
1918use datafusion:: physical_expr:: PhysicalExpr ;
@@ -161,11 +160,8 @@ impl<'a> Planner<'a> {
161160 . ok_or_else ( || DataFusionError :: Plan ( "missing input" . to_string ( ) ) ) ?;
162161
163162 // need to convert to ExecutionPlan to get the partial schema.
164- let partial_aggregation_exec_plan = partial_aggregation_plan. try_into_physical_plan (
165- self . schema_provider ,
166- & RuntimeEnvBuilder :: new ( ) . build ( ) . unwrap ( ) ,
167- & codec,
168- ) ?;
163+ let partial_aggregation_exec_plan =
164+ partial_aggregation_plan. try_into_physical_plan ( self . schema_provider , & codec) ?;
169165
170166 let partial_schema = partial_aggregation_exec_plan. schema ( ) ;
171167 let final_input_table_provider =
@@ -244,7 +240,7 @@ impl ExtensionPlanner for ArroyoExtensionPlanner {
244240 physical_inputs : & [ Arc < dyn ExecutionPlan > ] ,
245241 _session_state : & SessionState ,
246242 ) -> Result < Option < Arc < dyn ExecutionPlan > > > {
247- let schema = node. schema ( ) . as_ref ( ) . into ( ) ;
243+ let schema = node. schema ( ) . as_arrow ( ) . clone ( ) ;
248244 if let Ok :: < & dyn ArroyoExtension , _ > ( arroyo_extension) = node. try_into ( )
249245 && arroyo_extension. transparent ( )
250246 {
0 commit comments