Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions datafusion/physical-plan/src/aggregates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,17 +1610,6 @@ impl AggregateExec {
_ => Precision::Absent,
}
}

fn with_new_children_and_same_properties(
&self,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Self {
Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(self)
}
}
}

impl DisplayAs for AggregateExec {
Expand Down Expand Up @@ -1838,6 +1827,17 @@ impl ExecutionPlan for AggregateExec {
Ok(Arc::new(me))
}

fn with_new_children_and_same_properties(
self: Arc<Self>,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(Arc::new(Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(&*self)
}))
}

fn execute(
&self,
partition: usize,
Expand Down
22 changes: 11 additions & 11 deletions datafusion/physical-plan/src/async_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ impl AsyncFuncExec {
pub fn input(&self) -> &Arc<dyn ExecutionPlan> {
&self.input
}

fn with_new_children_and_same_properties(
&self,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Self {
Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(self)
}
}
}

impl DisplayAs for AsyncFuncExec {
Expand Down Expand Up @@ -180,6 +169,17 @@ impl ExecutionPlan for AsyncFuncExec {
)?))
}

fn with_new_children_and_same_properties(
self: Arc<Self>,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(Arc::new(Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(&*self)
}))
}

fn execute(
&self,
partition: usize,
Expand Down
22 changes: 11 additions & 11 deletions datafusion/physical-plan/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,6 @@ impl BufferExec {
pub fn capacity(&self) -> usize {
self.capacity
}

fn with_new_children_and_same_properties(
&self,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Self {
Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(self)
}
}
}

impl DisplayAs for BufferExec {
Expand Down Expand Up @@ -181,6 +170,17 @@ impl ExecutionPlan for BufferExec {
Ok(Arc::new(Self::new(children.swap_remove(0), self.capacity)))
}

fn with_new_children_and_same_properties(
self: Arc<Self>,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(Arc::new(Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(&*self)
}))
}

fn execute(
&self,
partition: usize,
Expand Down
22 changes: 11 additions & 11 deletions datafusion/physical-plan/src/coalesce_batches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,6 @@ impl CoalesceBatchesExec {
input.boundedness(),
)
}

fn with_new_children_and_same_properties(
&self,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Self {
Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(self)
}
}
}

#[expect(deprecated)]
Expand Down Expand Up @@ -195,6 +184,17 @@ impl ExecutionPlan for CoalesceBatchesExec {
))
}

fn with_new_children_and_same_properties(
self: Arc<Self>,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(Arc::new(Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(&*self)
}))
}

fn execute(
&self,
partition: usize,
Expand Down
22 changes: 11 additions & 11 deletions datafusion/physical-plan/src/coalesce_partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,6 @@ impl CoalescePartitionsExec {
.with_evaluation_type(drive)
.with_scheduling_type(scheduling)
}

fn with_new_children_and_same_properties(
&self,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Self {
Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(self)
}
}
}

impl DisplayAs for CoalescePartitionsExec {
Expand Down Expand Up @@ -164,6 +153,17 @@ impl ExecutionPlan for CoalescePartitionsExec {
Ok(Arc::new(plan))
}

fn with_new_children_and_same_properties(
self: Arc<Self>,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(Arc::new(Self {
input: children.swap_remove(0),
metrics: ExecutionPlanMetricsSet::new(),
..Self::clone(&*self)
}))
}

fn execute(
&self,
partition: usize,
Expand Down
20 changes: 10 additions & 10 deletions datafusion/physical-plan/src/coop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,6 @@ impl CooperativeExec {
pub fn input(&self) -> &Arc<dyn ExecutionPlan> {
&self.input
}

fn with_new_children_and_same_properties(
&self,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Self {
Self {
input: children.swap_remove(0),
..Self::clone(self)
}
}
}

impl DisplayAs for CooperativeExec {
Expand Down Expand Up @@ -290,6 +280,16 @@ impl ExecutionPlan for CooperativeExec {
Ok(Arc::new(CooperativeExec::new(children.swap_remove(0))))
}

fn with_new_children_and_same_properties(
self: Arc<Self>,
mut children: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(Arc::new(Self {
input: children.swap_remove(0),
..Self::clone(&*self)
}))
}

fn execute(
&self,
partition: usize,
Expand Down
Loading
Loading