This is an automated email from the ASF dual-hosted git repository.

github-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 af1522c190 Publish built docs triggered by 
34dad2ccee0e241d4db47afb3a137596b3abf11d
af1522c190 is described below

commit af1522c190f94c9276df65417f36c18f6e5e57a4
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Feb 24 20:59:30 2026 +0000

    Publish built docs triggered by 34dad2ccee0e241d4db47afb3a137596b3abf11d
---
 .../custom-table-providers.md.txt                  |  6 +--
 .../library-user-guide/upgrading/53.0.0.md.txt     | 63 ++++++++++++++++++++++
 library-user-guide/custom-table-providers.html     |  2 +-
 library-user-guide/upgrading/53.0.0.html           | 58 ++++++++++++++++++++
 searchindex.js                                     |  2 +-
 5 files changed, 126 insertions(+), 5 deletions(-)

diff --git a/_sources/library-user-guide/custom-table-providers.md.txt 
b/_sources/library-user-guide/custom-table-providers.md.txt
index 8e1dee9e84..50005a7527 100644
--- a/_sources/library-user-guide/custom-table-providers.md.txt
+++ b/_sources/library-user-guide/custom-table-providers.md.txt
@@ -108,7 +108,7 @@ impl ExecutionPlan for CustomExec {
     }
 
 
-    fn properties(&self) -> &PlanProperties {
+    fn properties(&self) -> &Arc<PlanProperties> {
         unreachable!()
     }
 
@@ -232,7 +232,7 @@ The `scan` method of the `TableProvider` returns a 
`Result<Arc<dyn ExecutionPlan
 #     }
 #
 #
-#     fn properties(&self) -> &PlanProperties {
+#     fn properties(&self) -> &Arc<PlanProperties> {
 #         unreachable!()
 #     }
 #
@@ -424,7 +424,7 @@ This will allow you to use the custom table provider in 
DataFusion. For example,
 #     }
 #
 #
-#     fn properties(&self) -> &PlanProperties {
+#     fn properties(&self) -> &Arc<PlanProperties> {
 #         unreachable!()
 #     }
 #
diff --git a/_sources/library-user-guide/upgrading/53.0.0.md.txt 
b/_sources/library-user-guide/upgrading/53.0.0.md.txt
index 06c917b2ab..ad2a69c0cc 100644
--- a/_sources/library-user-guide/upgrading/53.0.0.md.txt
+++ b/_sources/library-user-guide/upgrading/53.0.0.md.txt
@@ -28,6 +28,69 @@
 
 [#19692]: https://github.com/apache/datafusion/issues/19692
 
+### `ExecutionPlan::properties` now returns `&Arc<PlanProperties>`
+
+Now `ExecutionPlan::properties()` returns `&Arc<PlanProperties>` instead of a
+reference. This make it possible to cheaply clone properties and reuse them 
across multiple
+`ExecutionPlans`. It also makes it possible to optimize 
[`ExecutionPlan::with_new_children`]
+to reuse properties when the children plans have not changed, which can 
significantly reduce
+planning time for complex queries.
+
+[`ExecutionPlan::with_new_children`](https://docs.rs/datafusion/latest/datafusion/physical_plan/trait.ExecutionPlan.html#tymethod.with_new_children)
+
+To migrate, in all `ExecutionPlan` implementations, you will likely need to 
wrap
+stored `PlanProperties` in an `Arc`:
+
+```diff
+-    cache: PlanProperties,
++    cache: Arc<PlanProperties>,
+
+...
+
+-    fn properties(&self) -> &PlanProperties {
++    fn properties(&self) -> &Arc<PlanProperties> {
+         &self.cache
+     }
+```
+
+To improve performance of `with_new_children` for custom `ExecutionPlan`
+implementations, you can use the new macro: `check_if_same_properties`. For it
+to work, you need to implement the function:
+`with_new_children_and_same_properties` with semantics identical to
+`with_new_children`, but operating under the assumption that the properties of
+the children plans have not changed.
+
+An example of supporting this optimization for `ProjectionExec`:
+
+```diff
+     impl ProjectionExec {
++       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 ExecutionPlan for ProjectionExec {
+        fn with_new_children(
+            self: Arc<Self>,
+            mut children: Vec<Arc<dyn ExecutionPlan>>,
+        ) -> Result<Arc<dyn ExecutionPlan>> {
++           check_if_same_properties!(self, children);
+            ProjectionExec::try_new(
+                self.projector.projection().into_iter().cloned(),
+                children.swap_remove(0),
+            )
+            .map(|p| Arc::new(p) as _)
+        }
+    }
+```
+
 ### `PlannerContext` outer query schema API now uses a stack
 
 `PlannerContext` no longer stores a single `outer_query_schema`. It now tracks 
a
diff --git a/library-user-guide/custom-table-providers.html 
b/library-user-guide/custom-table-providers.html
index 5e33a8cd21..9b338ce66e 100644
--- a/library-user-guide/custom-table-providers.html
+++ b/library-user-guide/custom-table-providers.html
@@ -493,7 +493,7 @@ constraints are handled, see <a class="reference internal" 
href="table-constrain
 <span class="w">    </span><span class="p">}</span>
 
 
-<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">&amp;</span><span class="bp">self</span><span class="p">)</span><span 
class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span 
class="kp">&amp;</span><span class="nc">PlanProperties</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">properties</span><span class="p">(</span><span 
class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span 
class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span 
class="kp">&amp;</span><span class="nc">Arc</span><span 
class="o">&lt;</span><span class="n">PlanProperties</span><span 
class="o">&gt;</span><span class="w"> </span><span class="p">{</span>
 <span class="w">        </span><span class="fm">unreachable!</span><span 
class="p">()</span>
 <span class="w">    </span><span class="p">}</span>
 
diff --git a/library-user-guide/upgrading/53.0.0.html 
b/library-user-guide/upgrading/53.0.0.html
index 62ddf947a9..178803288b 100644
--- a/library-user-guide/upgrading/53.0.0.html
+++ b/library-user-guide/upgrading/53.0.0.html
@@ -427,6 +427,63 @@
 *in this section pertains to features and changes that have already been merged
 *to the main branch and are awaiting release in this version. See <a 
class="reference external" 
href="https://github.com/apache/datafusion/issues/19692";>#19692</a> for
 *more details.</p>
+<section id="executionplan-properties-now-returns-arc-planproperties">
+<h3><code class="docutils literal notranslate"><span 
class="pre">ExecutionPlan::properties</span></code> now returns <code 
class="docutils literal notranslate"><span 
class="pre">&amp;Arc&lt;PlanProperties&gt;</span></code><a class="headerlink" 
href="#executionplan-properties-now-returns-arc-planproperties" title="Link to 
this heading">#</a></h3>
+<p>Now <code class="docutils literal notranslate"><span 
class="pre">ExecutionPlan::properties()</span></code> returns <code 
class="docutils literal notranslate"><span 
class="pre">&amp;Arc&lt;PlanProperties&gt;</span></code> instead of a
+reference. This make it possible to cheaply clone properties and reuse them 
across multiple
+<code class="docutils literal notranslate"><span 
class="pre">ExecutionPlans</span></code>. It also makes it possible to optimize 
[<code class="docutils literal notranslate"><span 
class="pre">ExecutionPlan::with_new_children</span></code>]
+to reuse properties when the children plans have not changed, which can 
significantly reduce
+planning time for complex queries.</p>
+<p><a class="reference external" 
href="https://docs.rs/datafusion/latest/datafusion/physical_plan/trait.ExecutionPlan.html#tymethod.with_new_children";><code
 class="docutils literal notranslate"><span 
class="pre">ExecutionPlan::with_new_children</span></code></a></p>
+<p>To migrate, in all <code class="docutils literal notranslate"><span 
class="pre">ExecutionPlan</span></code> implementations, you will likely need 
to wrap
+stored <code class="docutils literal notranslate"><span 
class="pre">PlanProperties</span></code> in an <code class="docutils literal 
notranslate"><span class="pre">Arc</span></code>:</p>
+<div class="highlight-diff notranslate"><div 
class="highlight"><pre><span></span><span class="gd">-    cache: 
PlanProperties,</span>
+<span class="gi">+    cache: Arc&lt;PlanProperties&gt;,</span>
+
+...
+
+<span class="gd">-    fn properties(&amp;self) -&gt; &amp;PlanProperties 
{</span>
+<span class="gi">+    fn properties(&amp;self) -&gt; 
&amp;Arc&lt;PlanProperties&gt; {</span>
+<span class="w"> </span>        &amp;self.cache
+<span class="w"> </span>    }
+</pre></div>
+</div>
+<p>To improve performance of <code class="docutils literal notranslate"><span 
class="pre">with_new_children</span></code> for custom <code class="docutils 
literal notranslate"><span class="pre">ExecutionPlan</span></code>
+implementations, you can use the new macro: <code class="docutils literal 
notranslate"><span class="pre">check_if_same_properties</span></code>. For it
+to work, you need to implement the function:
+<code class="docutils literal notranslate"><span 
class="pre">with_new_children_and_same_properties</span></code> with semantics 
identical to
+<code class="docutils literal notranslate"><span 
class="pre">with_new_children</span></code>, but operating under the assumption 
that the properties of
+the children plans have not changed.</p>
+<p>An example of supporting this optimization for <code class="docutils 
literal notranslate"><span class="pre">ProjectionExec</span></code>:</p>
+<div class="highlight-diff notranslate"><div 
class="highlight"><pre><span></span><span class="w"> </span>    impl 
ProjectionExec {
+<span class="gi">+       fn with_new_children_and_same_properties(</span>
+<span class="gi">+           &amp;self,</span>
+<span class="gi">+           mut children: Vec&lt;Arc&lt;dyn 
ExecutionPlan&gt;&gt;,</span>
+<span class="gi">+       ) -&gt; Self {</span>
+<span class="gi">+           Self {</span>
+<span class="gi">+               input: children.swap_remove(0),</span>
+<span class="gi">+               metrics: 
ExecutionPlanMetricsSet::new(),</span>
+<span class="gi">+               ..Self::clone(self)</span>
+<span class="gi">+           }</span>
+<span class="gi">+       }</span>
+<span class="w"> </span>   }
+
+<span class="w"> </span>   impl ExecutionPlan for ProjectionExec {
+<span class="w"> </span>       fn with_new_children(
+<span class="w"> </span>           self: Arc&lt;Self&gt;,
+<span class="w"> </span>           mut children: Vec&lt;Arc&lt;dyn 
ExecutionPlan&gt;&gt;,
+<span class="w"> </span>       ) -&gt; Result&lt;Arc&lt;dyn 
ExecutionPlan&gt;&gt; {
+<span class="gi">+           check_if_same_properties!(self, children);</span>
+<span class="w"> </span>           ProjectionExec::try_new(
+<span class="w"> </span>               
self.projector.projection().into_iter().cloned(),
+<span class="w"> </span>               children.swap_remove(0),
+<span class="w"> </span>           )
+<span class="w"> </span>           .map(|p| Arc::new(p) as _)
+<span class="w"> </span>       }
+<span class="w"> </span>   }
+</pre></div>
+</div>
+</section>
 <section id="plannercontext-outer-query-schema-api-now-uses-a-stack">
 <h3><code class="docutils literal notranslate"><span 
class="pre">PlannerContext</span></code> outer query schema API now uses a 
stack<a class="headerlink" 
href="#plannercontext-outer-query-schema-api-now-uses-a-stack" title="Link to 
this heading">#</a></h3>
 <p><code class="docutils literal notranslate"><span 
class="pre">PlannerContext</span></code> no longer stores a single <code 
class="docutils literal notranslate"><span 
class="pre">outer_query_schema</span></code>. It now tracks a
@@ -780,6 +837,7 @@ This behavior is consistent with systems like 
PostgreSQL.</p>
   <nav class="bd-toc-nav page-toc" 
aria-labelledby="pst-page-navigation-heading-2">
     <ul class="visible nav section-nav flex-column">
 <li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" 
href="#datafusion-53-0-0">DataFusion 53.0.0</a><ul class="nav section-nav 
flex-column">
+<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" 
href="#executionplan-properties-now-returns-arc-planproperties"><code 
class="docutils literal notranslate"><span 
class="pre">ExecutionPlan::properties</span></code> now returns <code 
class="docutils literal notranslate"><span 
class="pre">&amp;Arc&lt;PlanProperties&gt;</span></code></a></li>
 <li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" 
href="#plannercontext-outer-query-schema-api-now-uses-a-stack"><code 
class="docutils literal notranslate"><span 
class="pre">PlannerContext</span></code> outer query schema API now uses a 
stack</a></li>
 <li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" 
href="#filesinkconfig-adds-file-output-mode"><code class="docutils literal 
notranslate"><span class="pre">FileSinkConfig</span></code> adds <code 
class="docutils literal notranslate"><span 
class="pre">file_output_mode</span></code></a></li>
 <li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" 
href="#simplifyinfo-trait-removed-simplifycontext-now-uses-builder-style-api"><code
 class="docutils literal notranslate"><span 
class="pre">SimplifyInfo</span></code> trait removed, <code class="docutils 
literal notranslate"><span class="pre">SimplifyContext</span></code> now uses 
builder-style API</a></li>
diff --git a/searchindex.js b/searchindex.js
index 68c90c04b7..b318883d9b 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles":{"!=":[[71,"op-neq"]],"!~":[[71,"op-re-not-match"]],"!~*":[[71,"op-re-not-match-i"]],"!~~":[[71,"id19"]],"!~~*":[[71,"id20"]],"#":[[71,"op-bit-xor"]],"%":[[71,"op-modulo"]],"&":[[71,"op-bit-and"]],"(relation,
 name) tuples in logical fields and logical columns are 
unique":[[14,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[71,"op-multiply"]],"+":[[71,"op-plus"]],"-":[[71,"op-minus"]],"/":[[71,"op-divide"]],"1.
 Array Literal Con [...]
\ No newline at end of file
+Search.setIndex({"alltitles":{"!=":[[71,"op-neq"]],"!~":[[71,"op-re-not-match"]],"!~*":[[71,"op-re-not-match-i"]],"!~~":[[71,"id19"]],"!~~*":[[71,"id20"]],"#":[[71,"op-bit-xor"]],"%":[[71,"op-modulo"]],"&":[[71,"op-bit-and"]],"(relation,
 name) tuples in logical fields and logical columns are 
unique":[[14,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[71,"op-multiply"]],"+":[[71,"op-plus"]],"-":[[71,"op-minus"]],"/":[[71,"op-divide"]],"1.
 Array Literal Con [...]
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to