You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/08/12 19:21:28 UTC
(datafusion) branch asf-site updated: Publish built docs triggered by caa3cb4af1bbf49403261e27714414bf7d41d71e
This is an automated email from the ASF dual-hosted git repository.
github-actions[bot] pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/asf-site by this push:
new c6a12c7afb Publish built docs triggered by caa3cb4af1bbf49403261e27714414bf7d41d71e
c6a12c7afb is described below
commit c6a12c7afb7aa1fe660fc0278ed0336b06b7ed93
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Wed Aug 12 19:21:23 2026 +0000
Publish built docs triggered by caa3cb4af1bbf49403261e27714414bf7d41d71e
---
.../custom-table-providers.md.txt | 40 +++++++++---
.../library-user-guide/upgrading/55.0.0.md.txt | 72 ++++++++++++++++++++++
library-user-guide/custom-table-providers.html | 25 ++++++--
library-user-guide/upgrading/55.0.0.html | 62 +++++++++++++++++++
searchindex.js | 2 +-
5 files changed, 186 insertions(+), 15 deletions(-)
diff --git a/_sources/library-user-guide/custom-table-providers.md.txt b/_sources/library-user-guide/custom-table-providers.md.txt
index c6a316aa74..c094f8bf7e 100644
--- a/_sources/library-user-guide/custom-table-providers.md.txt
+++ b/_sources/library-user-guide/custom-table-providers.md.txt
@@ -247,14 +247,22 @@ impl ExecutionPlan for MyExecPlan {
vec![] // Leaf node -- no children
}
- fn with_new_children(
+ fn replace_children(
self: Arc<Self>,
children: Vec<Arc<dyn ExecutionPlan>>,
+ _: ReplaceChildrenOptions,
) -> Result<Arc<dyn ExecutionPlan>> {
assert!(children.is_empty());
Ok(self)
}
+ fn with_new_children(
+ self: Arc<Self>,
+ children: Vec<Arc<dyn ExecutionPlan>>,
+ ) -> Result<Arc<dyn ExecutionPlan>> {
+ self.replace_children(children, ReplaceChildrenOptions::new(ChildrenPropertiesMode::Recompute))
+ }
+
fn execute(
&self,
partition: usize,
@@ -655,7 +663,7 @@ and reading files that cannot possibly match the query.
# use datafusion::execution::context::TaskContext;
# use datafusion::logical_expr::{Expr, TableProviderFilterPushDown};
# use datafusion::physical_expr::EquivalenceProperties;
-# use datafusion::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan, Partitioning, PhysicalExpr, PlanProperties};
+# use datafusion::physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan, Partitioning, PhysicalExpr, PlanProperties, ChildrenPropertiesMode, ReplaceChildrenOptions};
# use datafusion::physical_plan::execution_plan::{Boundedness, EmissionType};
#
/// A table provider backed by date-partitioned directories.
@@ -764,7 +772,15 @@ impl DatePartitionedTable {
# fn name(&self) -> &str { "DatePartitionedExec" }
# fn properties(&self) -> &Arc<PlanProperties> { &self.properties }
# fn children(&self) -> Vec<&Arc<dyn ExecutionPlan>> { vec![] }
-# fn with_new_children(self: Arc<Self>, _: Vec<Arc<dyn ExecutionPlan>>) -> Result<Arc<dyn ExecutionPlan>> { Ok(self) }
+# fn replace_children(self: Arc<Self>, _: Vec<Arc<dyn ExecutionPlan>>, _: ReplaceChildrenOptions) -> Result<Arc<dyn ExecutionPlan>> { Ok(self) }
+#
+# fn with_new_children(
+# self: Arc<Self>,
+# children: Vec<Arc<dyn ExecutionPlan>>,
+# ) -> Result<Arc<dyn ExecutionPlan>> {
+# self.replace_children(children, ReplaceChildrenOptions::new(ChildrenPropertiesMode::Recompute))
+# }
+#
# fn execute(&self, _: usize, _: Arc<TaskContext>) -> Result<SendableRecordBatchStream> { todo!() }
# fn apply_expressions(&self, _f: &mut dyn FnMut(&Arc<dyn PhysicalExpr>) -> Result<TreeNodeRecursion>) -> Result<TreeNodeRecursion> { Ok(TreeNodeRecursion::Continue) }
# }
@@ -801,10 +817,8 @@ use datafusion::physical_expr::EquivalenceProperties;
use datafusion::physical_plan::execution_plan::{Boundedness, EmissionType};
use datafusion::physical_plan::stream::RecordBatchStreamAdapter;
use datafusion::physical_plan::{
-# DisplayAs, DisplayFormatType,
- ExecutionPlan, Partitioning,
-# PhysicalExpr,
- PlanProperties,
+# DisplayAs, DisplayFormatType, PhysicalExpr,
+ ChildrenPropertiesMode, ReplaceChildrenOptions, ExecutionPlan, Partitioning, PlanProperties,
};
use futures::stream;
@@ -874,13 +888,21 @@ impl ExecutionPlan for CountingExec {
fn properties(&self) -> &Arc<PlanProperties> { &self.properties }
fn children(&self) -> Vec<&Arc<dyn ExecutionPlan>> { vec![] }
- fn with_new_children(
+ fn replace_children(
self: Arc<Self>,
- _children: Vec<Arc<dyn ExecutionPlan>>,
+ _: Vec<Arc<dyn ExecutionPlan>>,
+ _: ReplaceChildrenOptions,
) -> Result<Arc<dyn ExecutionPlan>> {
Ok(self)
}
+ fn with_new_children(
+ self: Arc<Self>,
+ children: Vec<Arc<dyn ExecutionPlan>>,
+ ) -> Result<Arc<dyn ExecutionPlan>> {
+ self.replace_children(children, ReplaceChildrenOptions::new(ChildrenPropertiesMode::Recompute))
+ }
+
fn execute(
&self,
partition: usize,
diff --git a/_sources/library-user-guide/upgrading/55.0.0.md.txt b/_sources/library-user-guide/upgrading/55.0.0.md.txt
index 7d0c19c846..d64f287ea0 100644
--- a/_sources/library-user-guide/upgrading/55.0.0.md.txt
+++ b/_sources/library-user-guide/upgrading/55.0.0.md.txt
@@ -576,6 +576,78 @@ See [PR #22733](https://github.com/apache/datafusion/pull/22733) for
details, including the per-variant size breakdown and benchmark
results.
+### `ExecutionPlan::with_new_children` and `ExecutionPlan::with_new_children_and_same_properties` deprecated
+
+`with_new_children` and `with_new_children_and_same_properties` have been
+deprecated. These methods are used to replace the child plans of an
+`ExecutionPlan` while leaving the plan otherwise identical.
+
+`with_new_children_if_necessary` has also been deprecated in favor of
+`replace_children_if_necessary` for consistency in naming.
+
+As noted [here](https://github.com/apache/datafusion/pull/23332#discussion_r3554897693),
+while the addition of `with_new_children_and_same_properties` has the benefit
+of skipping potentially expensive computation in the case that replacement children
+have the same properties as the original children, it widens the API surface area
+of `ExecutionPlan` in a way that could be confusing for users.
+
+Thus, to rectify this, we unify these methods by introducing `replace_children`.
+`replace_children` solves this problem by taking `ReplaceChildrenOptions`,
+which includes a `ChildrenPropertiesMode`. The mode has two variants,
+`Keep` and `Recompute`, which tell `replace_children` whether plan
+properties can be reused or need to be recomputed.
+
+This method is called from `replace_children_if_necessary`, which is the
+standard entry point that should be used for replacing the children of a node.
+
+**Migration guide:**
+
+To migrate from `with_new_children` and `with_new_children_and_same_properties`
+to `replace_children`, it is recommended to implement `replace_children` with
+a `match` statement matching on the `ChildrenPropertiesMode`. In the case that
+the properties match the children, `ChildrenPropertiesMode::Keep`,
+follow the body of `with_new_children_and_same_properties`. In the case that
+the properties do not match the children, `ChildrenPropertiesMode::Recompute`,
+follow the body of `with_new_children`.
+
+For example, take a look at the implementation for `FilterExec`:
+
+```
+ fn replace_children(
+ self: Arc<Self>,
+ mut children: Vec<Arc<dyn ExecutionPlan>>,
+ options: ReplaceChildrenOptions,
+ ) -> Result<Arc<dyn ExecutionPlan>> {
+ validate_child_count!(self, children);
+ match options.children_properties {
+ ChildrenPropertiesMode::Keep => Ok(Arc::new(Self {
+ input: children.swap_remove(0),
+ metrics: ExecutionPlanMetricsSet::new(),
+ ..Self::clone(&*self)
+ })),
+ ChildrenPropertiesMode::Recompute => {
+ let new_input = children.swap_remove(0);
+ FilterExecBuilder::from(&*self)
+ .with_input(new_input)
+ .build()
+ .map(|e| Arc::new(e) as _)
+ }
+ }
+ }
+```
+
+In the case that the options indicate the properties are the same, we can simply
+swap the children without having to recompute the properties. In the other case,
+we create a new node from scratch.
+
+To ensure that this works correctly, it is recommended that users also look
+through their codebase and ensure that they use `replace_children_if_necessary`
+for these changes — `replace_children_if_necessary` should be preferred over
+manual use of `replace_children`, since `replace_children_if_necessary` will
+call `replace_children` with the correct options filled in.
+
+See [PR #23903](https://github.com/apache/datafusion/pull/23903) for details.
+
### `ListingOptions::target_partitions` and `collect_stat` removed
The `target_partitions` and `collect_stat` fields on
diff --git a/library-user-guide/custom-table-providers.html b/library-user-guide/custom-table-providers.html
index d489a662f2..f08c113afa 100644
--- a/library-user-guide/custom-table-providers.html
+++ b/library-user-guide/custom-table-providers.html
@@ -673,14 +673,22 @@ provider’s <code class="docutils literal notranslate"><span class="pre">scan()
<span class="w"> </span><span class="fm">vec!</span><span class="p">[]</span><span class="w"> </span><span class="c1">// Leaf node -- no children</span>
<span class="w"> </span><span class="p">}</span>
-<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">with_new_children</span><span class="p">(</span>
+<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">replace_children</span><span class="p">(</span>
<span class="w"> </span><span class="bp">self</span><span class="p">:</span><span class="w"> </span><span class="nc">Arc</span><span class="o"><</span><span class="bp">Self</span><span class="o">></span><span class="p">,</span>
<span class="w"> </span><span class="n">children</span><span class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="p">,</span>
+<span class="w"> </span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="nc">ReplaceChildrenOptions</span><span class="p">,</span>
<span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">-></span><span class="w"> </span><span class="nb">Result</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="fm">assert!</span><span class="p">(</span><span class="n">children</span><span class="p">.</span><span class="n">is_empty</span><span class="p">());</span>
<span class="w"> </span><span class="nb">Ok</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="w"> </span><span class="p">}</span>
+<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">with_new_children</span><span class="p">(</span>
+<span class="w"> </span><span class="bp">self</span><span class="p">:</span><span class="w"> </span><span class="nc">Arc</span><span class="o"><</span><span class="bp">Self</span><span class="o">></span><span class="p">,</span>
+<span class="w"> </span><span class="n">children</span><span class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="p">,</span>
+<span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">-></span><span class="w"> </span><span class="nb">Result</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="w"> </span><span class="p">{</span>
+<span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">replace_children</span><span class="p">(</span><span class="n">children</span><span class="p">,</span><span class="w"> </span><span class="n">ReplaceChildrenOptions</span><span class="p">::</span><span class="n">new</span><span class="p">(</span><span class="n">ChildrenPropertiesMode</span><span class="p">::</span><span class="n">Recompute</span><span class="p">))</span>
+<span class="w"> </span><span class="p">}</span>
+
<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">execute</span><span class="p">(</span>
<span class="w"> </span><span class="o">&</span><span class="bp">self</span><span class="p">,</span>
<span class="w"> </span><span class="n">partition</span><span class="p">:</span><span class="w"> </span><span class="kt">usize</span><span class="p">,</span>
@@ -1148,8 +1156,7 @@ data lazily during streaming:</p>
<span class="k">use</span><span class="w"> </span><span class="n">datafusion</span><span class="p">::</span><span class="n">physical_plan</span><span class="p">::</span><span class="n">execution_plan</span><span class="p">::{</span><span class="n">Boundedness</span><span class="p">,</span><span class="w"> </span><span class="n">EmissionType</span><span class="p">};</span>
<span class="k">use</span><span class="w"> </span><span class="n">datafusion</span><span class="p">::</span><span class="n">physical_plan</span><span class="p">::</span><span class="n">stream</span><span class="p">::</span><span class="n">RecordBatchStreamAdapter</span><span class="p">;</span>
<span class="k">use</span><span class="w"> </span><span class="n">datafusion</span><span class="p">::</span><span class="n">physical_plan</span><span class="p">::{</span>
-<span class="w"> </span><span class="n">ExecutionPlan</span><span class="p">,</span><span class="w"> </span><span class="n">Partitioning</span><span class="p">,</span>
-<span class="w"> </span><span class="n">PlanProperties</span><span class="p">,</span>
+<span class="w"> </span><span class="n">ChildrenPropertiesMode</span><span class="p">,</span><span class="w"> </span><span class="n">ReplaceChildrenOptions</span><span class="p">,</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="p">,</span><span class="w"> </span><span class="n">Partitioning</span><span class="p">,</span><span class="w"> </span><span class="n">PlanProperties</span><span class="p">,</span>
<span class="p">};</span>
<span class="k">use</span><span class="w"> </span><span class="n">futures</span><span class="p">::</span><span class="n">stream</span><span class="p">;</span>
@@ -1211,13 +1218,21 @@ data lazily during streaming:</p>
<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">properties</span><span class="p">(</span><span class="o">&</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">-></span><span class="w"> </span><span class="kp">&</span><span class="nc">Arc</span><span class="o"><</span><span class="n">PlanProperties</span><span class="o">></span><span class="w"> </span><span class="p">{</span><span c [...]
<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">children</span><span class="p">(</span><span class="o">&</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">-></span><span class="w"> </span><span class="nb">Vec</span><span class="o"><&</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span [...]
-<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">with_new_children</span><span class="p">(</span>
+<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">replace_children</span><span class="p">(</span>
<span class="w"> </span><span class="bp">self</span><span class="p">:</span><span class="w"> </span><span class="nc">Arc</span><span class="o"><</span><span class="bp">Self</span><span class="o">></span><span class="p">,</span>
-<span class="w"> </span><span class="n">_children</span><span class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="p">,</span>
+<span class="w"> </span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="p">,</span>
+<span class="w"> </span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="nc">ReplaceChildrenOptions</span><span class="p">,</span>
<span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">-></span><span class="w"> </span><span class="nb">Result</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nb">Ok</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="w"> </span><span class="p">}</span>
+<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">with_new_children</span><span class="p">(</span>
+<span class="w"> </span><span class="bp">self</span><span class="p">:</span><span class="w"> </span><span class="nc">Arc</span><span class="o"><</span><span class="bp">Self</span><span class="o">></span><span class="p">,</span>
+<span class="w"> </span><span class="n">children</span><span class="p">:</span><span class="w"> </span><span class="nb">Vec</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="p">,</span>
+<span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">-></span><span class="w"> </span><span class="nb">Result</span><span class="o"><</span><span class="n">Arc</span><span class="o"><</span><span class="k">dyn</span><span class="w"> </span><span class="n">ExecutionPlan</span><span class="o">>></span><span class="w"> </span><span class="p">{</span>
+<span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">replace_children</span><span class="p">(</span><span class="n">children</span><span class="p">,</span><span class="w"> </span><span class="n">ReplaceChildrenOptions</span><span class="p">::</span><span class="n">new</span><span class="p">(</span><span class="n">ChildrenPropertiesMode</span><span class="p">::</span><span class="n">Recompute</span><span class="p">))</span>
+<span class="w"> </span><span class="p">}</span>
+
<span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">execute</span><span class="p">(</span>
<span class="w"> </span><span class="o">&</span><span class="bp">self</span><span class="p">,</span>
<span class="w"> </span><span class="n">partition</span><span class="p">:</span><span class="w"> </span><span class="kt">usize</span><span class="p">,</span>
diff --git a/library-user-guide/upgrading/55.0.0.html b/library-user-guide/upgrading/55.0.0.html
index 6caacfbcc2..6551d63918 100644
--- a/library-user-guide/upgrading/55.0.0.html
+++ b/library-user-guide/upgrading/55.0.0.html
@@ -938,6 +938,67 @@ the variant, dereference the box with <code class="docutils literal notranslate"
details, including the per-variant size breakdown and benchmark
results.</p>
</section>
+<section id="executionplan-with-new-children-and-executionplan-with-new-children-and-same-properties-deprecated">
+<h3><code class="docutils literal notranslate"><span class="pre">ExecutionPlan::with_new_children</span></code> and <code class="docutils literal notranslate"><span class="pre">ExecutionPlan::with_new_children_and_same_properties</span></code> deprecated<a class="headerlink" href="#executionplan-with-new-children-and-executionplan-with-new-children-and-same-properties-deprecated" title="Link to this heading">#</a></h3>
+<p><code class="docutils literal notranslate"><span class="pre">with_new_children</span></code> and <code class="docutils literal notranslate"><span class="pre">with_new_children_and_same_properties</span></code> have been
+deprecated. These methods are used to replace the child plans of an
+<code class="docutils literal notranslate"><span class="pre">ExecutionPlan</span></code> while leaving the plan otherwise identical.</p>
+<p><code class="docutils literal notranslate"><span class="pre">with_new_children_if_necessary</span></code> has also been deprecated in favor of
+<code class="docutils literal notranslate"><span class="pre">replace_children_if_necessary</span></code> for consistency in naming.</p>
+<p>As noted <a class="reference external" href="https://github.com/apache/datafusion/pull/23332#discussion_r3554897693">here</a>,
+while the addition of <code class="docutils literal notranslate"><span class="pre">with_new_children_and_same_properties</span></code> has the benefit
+of skipping potentially expensive computation in the case that replacement children
+have the same properties as the original children, it widens the API surface area
+of <code class="docutils literal notranslate"><span class="pre">ExecutionPlan</span></code> in a way that could be confusing for users.</p>
+<p>Thus, to rectify this, we unify these methods by introducing <code class="docutils literal notranslate"><span class="pre">replace_children</span></code>.
+<code class="docutils literal notranslate"><span class="pre">replace_children</span></code> solves this problem by taking <code class="docutils literal notranslate"><span class="pre">ReplaceChildrenOptions</span></code>,
+which includes a <code class="docutils literal notranslate"><span class="pre">ChildrenPropertiesMode</span></code>. The mode has two variants,
+<code class="docutils literal notranslate"><span class="pre">Keep</span></code> and <code class="docutils literal notranslate"><span class="pre">Recompute</span></code>, which tell <code class="docutils literal notranslate"><span class="pre">replace_children</span></code> whether plan
+properties can be reused or need to be recomputed.</p>
+<p>This method is called from <code class="docutils literal notranslate"><span class="pre">replace_children_if_necessary</span></code>, which is the
+standard entry point that should be used for replacing the children of a node.</p>
+<p><strong>Migration guide:</strong></p>
+<p>To migrate from <code class="docutils literal notranslate"><span class="pre">with_new_children</span></code> and <code class="docutils literal notranslate"><span class="pre">with_new_children_and_same_properties</span></code>
+to <code class="docutils literal notranslate"><span class="pre">replace_children</span></code>, it is recommended to implement <code class="docutils literal notranslate"><span class="pre">replace_children</span></code> with
+a <code class="docutils literal notranslate"><span class="pre">match</span></code> statement matching on the <code class="docutils literal notranslate"><span class="pre">ChildrenPropertiesMode</span></code>. In the case that
+the properties match the children, <code class="docutils literal notranslate"><span class="pre">ChildrenPropertiesMode::Keep</span></code>,
+follow the body of <code class="docutils literal notranslate"><span class="pre">with_new_children_and_same_properties</span></code>. In the case that
+the properties do not match the children, <code class="docutils literal notranslate"><span class="pre">ChildrenPropertiesMode::Recompute</span></code>,
+follow the body of <code class="docutils literal notranslate"><span class="pre">with_new_children</span></code>.</p>
+<p>For example, take a look at the implementation for <code class="docutils literal notranslate"><span class="pre">FilterExec</span></code>:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> fn replace_children(
+ self: Arc<Self>,
+ mut children: Vec<Arc<dyn ExecutionPlan>>,
+ options: ReplaceChildrenOptions,
+ ) -> Result<Arc<dyn ExecutionPlan>> {
+ validate_child_count!(self, children);
+ match options.children_properties {
+ ChildrenPropertiesMode::Keep => Ok(Arc::new(Self {
+ input: children.swap_remove(0),
+ metrics: ExecutionPlanMetricsSet::new(),
+ ..Self::clone(&*self)
+ })),
+ ChildrenPropertiesMode::Recompute => {
+ let new_input = children.swap_remove(0);
+ FilterExecBuilder::from(&*self)
+ .with_input(new_input)
+ .build()
+ .map(|e| Arc::new(e) as _)
+ }
+ }
+ }
+</pre></div>
+</div>
+<p>In the case that the options indicate the properties are the same, we can simply
+swap the children without having to recompute the properties. In the other case,
+we create a new node from scratch.</p>
+<p>To ensure that this works correctly, it is recommended that users also look
+through their codebase and ensure that they use <code class="docutils literal notranslate"><span class="pre">replace_children_if_necessary</span></code>
+for these changes — <code class="docutils literal notranslate"><span class="pre">replace_children_if_necessary</span></code> should be preferred over
+manual use of <code class="docutils literal notranslate"><span class="pre">replace_children</span></code>, since <code class="docutils literal notranslate"><span class="pre">replace_children_if_necessary</span></code> will
+call <code class="docutils literal notranslate"><span class="pre">replace_children</span></code> with the correct options filled in.</p>
+<p>See <a class="reference external" href="https://github.com/apache/datafusion/pull/23903">PR #23903</a> for details.</p>
+</section>
<section id="listingoptions-target-partitions-and-collect-stat-removed">
<h3><code class="docutils literal notranslate"><span class="pre">ListingOptions::target_partitions</span></code> and <code class="docutils literal notranslate"><span class="pre">collect_stat</span></code> removed<a class="headerlink" href="#listingoptions-target-partitions-and-collect-stat-removed" title="Link to this heading">#</a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">target_partitions</span></code> and <code class="docutils literal notranslate"><span class="pre">collect_stat</span></code> fields on
@@ -1568,6 +1629,7 @@ changes.</p>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#queryplanner-adds-any-as-a-supertrait"><code class="docutils literal notranslate"><span class="pre">QueryPlanner</span></code> adds <code class="docutils literal notranslate"><span class="pre">Any</span></code> as a supertrait</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#executionplan-partition-statistics-deprecated-in-favor-of-statistics-from-inputs"><code class="docutils literal notranslate"><span class="pre">ExecutionPlan::partition_statistics</span></code> deprecated in favor of <code class="docutils literal notranslate"><span class="pre">statistics_from_inputs</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#ddlstatement-createexternaltable-and-createfunction-are-now-boxed"><code class="docutils literal notranslate"><span class="pre">DdlStatement::CreateExternalTable</span></code> and <code class="docutils literal notranslate"><span class="pre">CreateFunction</span></code> are now boxed</a></li>
+<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#executionplan-with-new-children-and-executionplan-with-new-children-and-same-properties-deprecated"><code class="docutils literal notranslate"><span class="pre">ExecutionPlan::with_new_children</span></code> and <code class="docutils literal notranslate"><span class="pre">ExecutionPlan::with_new_children_and_same_properties</span></code> deprecated</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#listingoptions-target-partitions-and-collect-stat-removed"><code class="docutils literal notranslate"><span class="pre">ListingOptions::target_partitions</span></code> and <code class="docutils literal notranslate"><span class="pre">collect_stat</span></code> removed</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#spark-map-functions-now-reject-duplicate-keys-by-default">Spark map functions now reject duplicate keys by default</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#unify-lru-memory-limiting-caches-into-one-generic-cache">Unify LRU memory-limiting caches into one generic cache</a></li>
diff --git a/searchindex.js b/searchindex.js
index 64f88470b7..b095067f7f 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles":{"!=":[[76,"op-neq"]],"!~":[[76,"op-re-not-match"]],"!~*":[[76,"op-re-not-match-i"]],"!~~":[[76,"id19"]],"!~~*":[[76,"id20"]],"#":[[76,"op-bit-xor"]],"%":[[76,"op-modulo"]],"&":[[76,"op-bit-and"]],"(relation, name) tuples in logical fields and logical columns are unique":[[16,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[76,"op-multiply"]],"+":[[76,"op-plus"]],"-":[[76,"op-minus"]],"/":[[76,"op-divide"]],"1. Array Literal Con [...]
\ No newline at end of file
+Search.setIndex({"alltitles":{"!=":[[76,"op-neq"]],"!~":[[76,"op-re-not-match"]],"!~*":[[76,"op-re-not-match-i"]],"!~~":[[76,"id19"]],"!~~*":[[76,"id20"]],"#":[[76,"op-bit-xor"]],"%":[[76,"op-modulo"]],"&":[[76,"op-bit-and"]],"(relation, name) tuples in logical fields and logical columns are unique":[[16,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[76,"op-multiply"]],"+":[[76,"op-plus"]],"-":[[76,"op-minus"]],"/":[[76,"op-divide"]],"1. Array Literal Con [...]
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org