You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2023/01/11 14:28:14 UTC

[arrow-datafusion] branch master updated: Remove unused ExecutionPlan::relies_input_order (has been replaced with required_input_ordering) (#4856)

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

tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/master by this push:
     new 39d98f8f4 Remove unused ExecutionPlan::relies_input_order (has been replaced with required_input_ordering) (#4856)
39d98f8f4 is described below

commit 39d98f8f4528f408c3cc8a03ee1fe7ecd990a35f
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Wed Jan 11 15:28:07 2023 +0100

    Remove unused ExecutionPlan::relies_input_order (has been replaced with required_input_ordering) (#4856)
---
 .../core/src/physical_optimizer/repartition.rs      |  3 ---
 datafusion/core/src/physical_plan/limit.rs          |  8 --------
 datafusion/core/src/physical_plan/mod.rs            | 21 ---------------------
 datafusion/core/src/scheduler/pipeline/execution.rs |  4 ----
 4 files changed, 36 deletions(-)

diff --git a/datafusion/core/src/physical_optimizer/repartition.rs b/datafusion/core/src/physical_optimizer/repartition.rs
index 98ca12a9e..806ed1d4b 100644
--- a/datafusion/core/src/physical_optimizer/repartition.rs
+++ b/datafusion/core/src/physical_optimizer/repartition.rs
@@ -140,9 +140,6 @@ impl Repartition {
 ///
 /// 2. Has a direct parent that `benefits_from_input_partitioning`
 ///
-/// 3. Does not have a parent that `relies_on_input_order` unless there
-/// is an intervening node that does not `maintain_input_order`
-///
 /// if `can_reorder` is false, means that the output of this node
 /// can not be reordered as as the final output is relying on that order
 ///
diff --git a/datafusion/core/src/physical_plan/limit.rs b/datafusion/core/src/physical_plan/limit.rs
index 776fefd8b..eec66eb70 100644
--- a/datafusion/core/src/physical_plan/limit.rs
+++ b/datafusion/core/src/physical_plan/limit.rs
@@ -105,10 +105,6 @@ impl ExecutionPlan for GlobalLimitExec {
         Partitioning::UnknownPartitioning(1)
     }
 
-    fn relies_on_input_order(&self) -> bool {
-        self.input.output_ordering().is_some()
-    }
-
     fn maintains_input_order(&self) -> bool {
         true
     }
@@ -274,10 +270,6 @@ impl ExecutionPlan for LocalLimitExec {
         self.input.output_partitioning()
     }
 
-    fn relies_on_input_order(&self) -> bool {
-        self.input.output_ordering().is_some()
-    }
-
     fn benefits_from_input_partitioning(&self) -> bool {
         false
     }
diff --git a/datafusion/core/src/physical_plan/mod.rs b/datafusion/core/src/physical_plan/mod.rs
index d7383f231..b9a0d9707 100644
--- a/datafusion/core/src/physical_plan/mod.rs
+++ b/datafusion/core/src/physical_plan/mod.rs
@@ -141,27 +141,6 @@ pub trait ExecutionPlan: Debug + Send + Sync {
         vec![None; self.children().len()]
     }
 
-    /// Returns `true` if this operator relies on its inputs being
-    /// produced in a certain order (for example that they are sorted
-    /// a particular way) for correctness.
-    ///
-    /// If `true` is returned, DataFusion will not apply certain
-    /// optimizations which might reorder the inputs (such as
-    /// repartitioning to increase concurrency).
-    ///
-    /// The default implementation checks the input ordering requirements
-    /// and if there is non empty ordering requirements to the input, the method will
-    /// return `true`.
-    ///
-    /// WARNING: if you override this default and return `false`, your
-    /// operator can not rely on DataFusion preserving the input order
-    /// as it will likely not.
-    fn relies_on_input_order(&self) -> bool {
-        self.required_input_ordering()
-            .iter()
-            .any(|ordering| matches!(ordering, Some(_)))
-    }
-
     /// Returns `false` if this operator's implementation may reorder
     /// rows within or between partitions.
     ///
diff --git a/datafusion/core/src/scheduler/pipeline/execution.rs b/datafusion/core/src/scheduler/pipeline/execution.rs
index 8ecece85e..b5aa9aff6 100644
--- a/datafusion/core/src/scheduler/pipeline/execution.rs
+++ b/datafusion/core/src/scheduler/pipeline/execution.rs
@@ -239,10 +239,6 @@ impl ExecutionPlan for ProxyExecutionPlan {
         self.inner.required_input_distribution()
     }
 
-    fn relies_on_input_order(&self) -> bool {
-        self.inner.relies_on_input_order()
-    }
-
     fn maintains_input_order(&self) -> bool {
         self.inner.maintains_input_order()
     }