Skip to content

Commit 39d98f8

Browse files
authored
Remove unused ExecutionPlan::relies_input_order (has been replaced with required_input_ordering) (apache#4856)
1 parent 98b4696 commit 39d98f8

File tree

4 files changed

+0
-36
lines changed

4 files changed

+0
-36
lines changed

datafusion/core/src/physical_optimizer/repartition.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ impl Repartition {
140140
///
141141
/// 2. Has a direct parent that `benefits_from_input_partitioning`
142142
///
143-
/// 3. Does not have a parent that `relies_on_input_order` unless there
144-
/// is an intervening node that does not `maintain_input_order`
145-
///
146143
/// if `can_reorder` is false, means that the output of this node
147144
/// can not be reordered as as the final output is relying on that order
148145
///

datafusion/core/src/physical_plan/limit.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ impl ExecutionPlan for GlobalLimitExec {
105105
Partitioning::UnknownPartitioning(1)
106106
}
107107

108-
fn relies_on_input_order(&self) -> bool {
109-
self.input.output_ordering().is_some()
110-
}
111-
112108
fn maintains_input_order(&self) -> bool {
113109
true
114110
}
@@ -274,10 +270,6 @@ impl ExecutionPlan for LocalLimitExec {
274270
self.input.output_partitioning()
275271
}
276272

277-
fn relies_on_input_order(&self) -> bool {
278-
self.input.output_ordering().is_some()
279-
}
280-
281273
fn benefits_from_input_partitioning(&self) -> bool {
282274
false
283275
}

datafusion/core/src/physical_plan/mod.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,27 +141,6 @@ pub trait ExecutionPlan: Debug + Send + Sync {
141141
vec![None; self.children().len()]
142142
}
143143

144-
/// Returns `true` if this operator relies on its inputs being
145-
/// produced in a certain order (for example that they are sorted
146-
/// a particular way) for correctness.
147-
///
148-
/// If `true` is returned, DataFusion will not apply certain
149-
/// optimizations which might reorder the inputs (such as
150-
/// repartitioning to increase concurrency).
151-
///
152-
/// The default implementation checks the input ordering requirements
153-
/// and if there is non empty ordering requirements to the input, the method will
154-
/// return `true`.
155-
///
156-
/// WARNING: if you override this default and return `false`, your
157-
/// operator can not rely on DataFusion preserving the input order
158-
/// as it will likely not.
159-
fn relies_on_input_order(&self) -> bool {
160-
self.required_input_ordering()
161-
.iter()
162-
.any(|ordering| matches!(ordering, Some(_)))
163-
}
164-
165144
/// Returns `false` if this operator's implementation may reorder
166145
/// rows within or between partitions.
167146
///

datafusion/core/src/scheduler/pipeline/execution.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,6 @@ impl ExecutionPlan for ProxyExecutionPlan {
239239
self.inner.required_input_distribution()
240240
}
241241

242-
fn relies_on_input_order(&self) -> bool {
243-
self.inner.relies_on_input_order()
244-
}
245-
246242
fn maintains_input_order(&self) -> bool {
247243
self.inner.maintains_input_order()
248244
}

0 commit comments

Comments
 (0)