@@ -247,14 +247,22 @@ impl ExecutionPlan for MyExecPlan {
247247 vec![] // Leaf node -- no children
248248 }
249249
250- fn with_new_children (
250+ fn replace_children (
251251 self: Arc<Self>,
252252 children: Vec<Arc<dyn ExecutionPlan>>,
253+ _: ChildrenPropertiesHint,
253254 ) -> Result<Arc<dyn ExecutionPlan>> {
254255 assert!(children.is_empty());
255256 Ok(self)
256257 }
257258
259+ fn with_new_children(
260+ self: Arc<Self>,
261+ children: Vec<Arc<dyn ExecutionPlan>>,
262+ ) -> Result<Arc<dyn ExecutionPlan>> {
263+ self.replace_children(children, ChildrenPropertiesHint::Recompute)
264+ }
265+
258266 fn execute(
259267 &self,
260268 partition: usize,
@@ -655,7 +663,7 @@ and reading files that cannot possibly match the query.
655663# use datafusion :: execution :: context :: TaskContext ;
656664# use datafusion :: logical_expr :: {Expr , TableProviderFilterPushDown };
657665# use datafusion :: physical_expr :: EquivalenceProperties ;
658- # use datafusion :: physical_plan :: {DisplayAs , DisplayFormatType , ExecutionPlan , Partitioning , PhysicalExpr , PlanProperties };
666+ # use datafusion :: physical_plan :: {DisplayAs , DisplayFormatType , ExecutionPlan , Partitioning , PhysicalExpr , PlanProperties , ChildrenPropertiesHint };
659667# use datafusion :: physical_plan :: execution_plan :: {Boundedness , EmissionType };
660668#
661669/// A table provider backed by date-partitioned directories.
@@ -764,7 +772,15 @@ impl DatePartitionedTable {
764772# fn name (& self ) -> & str { " DatePartitionedExec" }
765773# fn properties (& self ) -> & Arc <PlanProperties > { & self . properties }
766774# fn children (& self ) -> Vec <& Arc <dyn ExecutionPlan >> { vec! [] }
767- # fn with_new_children (self : Arc <Self >, _ : Vec <Arc <dyn ExecutionPlan >>) -> Result <Arc <dyn ExecutionPlan >> { Ok (self ) }
775+ # fn replace_children (self : Arc <Self >, _ : Vec <Arc <dyn ExecutionPlan >>, _ : ChildrenPropertiesHint ) -> Result <Arc <dyn ExecutionPlan >> { Ok (self ) }
776+ #
777+ # fn with_new_children (
778+ # self : Arc <Self >,
779+ # children : Vec <Arc <dyn ExecutionPlan >>,
780+ # ) -> Result <Arc <dyn ExecutionPlan >> {
781+ # self . replace_children (children , ChildrenPropertiesHint :: Recompute )
782+ # }
783+ #
768784# fn execute (& self , _ : usize , _ : Arc <TaskContext >) -> Result <SendableRecordBatchStream > { todo! () }
769785# }
770786```
@@ -800,10 +816,8 @@ use datafusion::physical_expr::EquivalenceProperties;
800816use datafusion :: physical_plan :: execution_plan :: {Boundedness , EmissionType };
801817use datafusion :: physical_plan :: stream :: RecordBatchStreamAdapter ;
802818use datafusion :: physical_plan :: {
803- # DisplayAs , DisplayFormatType ,
804- ExecutionPlan , Partitioning ,
805- # PhysicalExpr ,
806- PlanProperties ,
819+ # DisplayAs , DisplayFormatType , PhysicalExpr ,
820+ ChildrenPropertiesHint , ExecutionPlan , Partitioning , PlanProperties ,
807821};
808822use futures :: stream;
809823
@@ -873,13 +887,21 @@ impl ExecutionPlan for CountingExec {
873887 fn properties (& self ) -> & Arc <PlanProperties > { & self . properties }
874888 fn children (& self ) -> Vec <& Arc <dyn ExecutionPlan >> { vec! [] }
875889
876- fn with_new_children (
890+ fn replace_children (
877891 self : Arc <Self >,
878- _children : Vec <Arc <dyn ExecutionPlan >>,
892+ _ : Vec <Arc <dyn ExecutionPlan >>,
893+ _ : ChildrenPropertiesHint ,
879894 ) -> Result <Arc <dyn ExecutionPlan >> {
880895 Ok (self )
881896 }
882897
898+ fn with_new_children (
899+ self : Arc <Self >,
900+ children : Vec <Arc <dyn ExecutionPlan >>,
901+ ) -> Result <Arc <dyn ExecutionPlan >> {
902+ self . replace_children (children , ChildrenPropertiesHint :: Recompute )
903+ }
904+
883905 fn execute (
884906 & self ,
885907 partition : usize ,
0 commit comments