This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 637293580d Return self in EmptyExec and PlaceholderRowExec
with_new_children (#10052)
637293580d is described below
commit 637293580db0634a4efbd3f52e4700992ee3080d
Author: Georgi Krastev <[email protected]>
AuthorDate: Sat Apr 13 03:23:43 2024 +0300
Return self in EmptyExec and PlaceholderRowExec with_new_children (#10052)
Thus preserving the number of partitions in the plan properties.
We are using `EmptyExec` with a specific number of partitions for testing.
It took me a while to realise the partitions were reset by plan rewriting.
---
datafusion/physical-plan/src/empty.rs | 2 +-
datafusion/physical-plan/src/placeholder_row.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/datafusion/physical-plan/src/empty.rs
b/datafusion/physical-plan/src/empty.rs
index 8e8eb4d25e..6178f7c88c 100644
--- a/datafusion/physical-plan/src/empty.rs
+++ b/datafusion/physical-plan/src/empty.rs
@@ -122,7 +122,7 @@ impl ExecutionPlan for EmptyExec {
self: Arc<Self>,
_: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
- Ok(Arc::new(EmptyExec::new(self.schema.clone())))
+ Ok(self)
}
fn execute(
diff --git a/datafusion/physical-plan/src/placeholder_row.rs
b/datafusion/physical-plan/src/placeholder_row.rs
index c047ff5122..d781c41d04 100644
--- a/datafusion/physical-plan/src/placeholder_row.rs
+++ b/datafusion/physical-plan/src/placeholder_row.rs
@@ -140,7 +140,7 @@ impl ExecutionPlan for PlaceholderRowExec {
self: Arc<Self>,
_: Vec<Arc<dyn ExecutionPlan>>,
) -> Result<Arc<dyn ExecutionPlan>> {
- Ok(Arc::new(PlaceholderRowExec::new(self.schema.clone())))
+ Ok(self)
}
fn execute(