Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions datafusion/core/src/physical_optimizer/repartition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
8 changes: 0 additions & 8 deletions datafusion/core/src/physical_plan/limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
21 changes: 0 additions & 21 deletions datafusion/core/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
4 changes: 0 additions & 4 deletions datafusion/core/src/scheduler/pipeline/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down