@@ -151,7 +151,9 @@ unsafe extern "C" fn with_new_children_fn_wrapper(
151151 . collect ( ) ;
152152
153153 let children = sresult_return ! ( children) ;
154- let new_plan = sresult_return ! ( inner_plan. with_new_children( children) ) ;
154+ let new_plan = sresult_return ! (
155+ inner_plan. replace_children( children, ChildrenPropertiesHint :: Recompute )
156+ ) ;
155157
156158 FFI_Result :: Ok ( FFI_ExecutionPlan :: new ( new_plan, runtime) )
157159}
@@ -268,7 +270,7 @@ fn pass_runtime_to_children(
268270 // If the parent is foreign and the child is local to this library, then when
269271 // we called `children()` above we will get something other than a
270272 // `ForeignExecutionPlan`. In this case wrap the plan in a `ForeignExecutionPlan`
271- // because when we call `with_new_children ` below it will extract the
273+ // because when we call `replace_children ` below it will extract the
272274 // FFI plan that does contain the runtime.
273275 if plan_is_foreign && !child. is :: < ForeignExecutionPlan > ( ) {
274276 updated_children = true ;
@@ -281,7 +283,9 @@ fn pass_runtime_to_children(
281283 } )
282284 . collect :: < Result < Vec < _ > > > ( ) ?;
283285 if updated_children {
284- Arc :: clone ( plan) . with_new_children ( children) . map ( Some )
286+ Arc :: clone ( plan)
287+ . replace_children ( children, ChildrenPropertiesHint :: Recompute )
288+ . map ( Some )
285289 } else {
286290 Ok ( None )
287291 }
@@ -636,7 +640,8 @@ pub mod tests {
636640 assert_eq ! ( parent_foreign. children( ) . len( ) , 0 ) ;
637641 assert_eq ! ( child_foreign. children( ) . len( ) , 0 ) ;
638642
639- let parent_foreign = parent_foreign. with_new_children ( vec ! [ child_foreign] ) ?;
643+ let parent_foreign = parent_foreign
644+ . replace_children ( vec ! [ child_foreign] , ChildrenPropertiesHint :: Recompute ) ?;
640645 assert_eq ! ( parent_foreign. children( ) . len( ) , 1 ) ;
641646
642647 // Version 2: Adding child to the local plan
@@ -646,7 +651,8 @@ pub mod tests {
646651 let child_foreign = <Arc < dyn ExecutionPlan > >:: try_from ( & child_local) ?;
647652
648653 let parent_plan = Arc :: new ( EmptyExec :: new ( Arc :: clone ( & schema) ) ) ;
649- let parent_plan = parent_plan. with_new_children ( vec ! [ child_foreign] ) ?;
654+ let parent_plan = parent_plan
655+ . replace_children ( vec ! [ child_foreign] , ChildrenPropertiesHint :: Recompute ) ?;
650656 let mut parent_local = FFI_ExecutionPlan :: new ( parent_plan, None ) ;
651657 parent_local. library_marker_id = crate :: mock_foreign_marker_id;
652658 let parent_foreign = <Arc < dyn ExecutionPlan > >:: try_from ( & parent_local) ?;
0 commit comments