From f6ef5ba7476dc5199759b69b618d6618458df656 Mon Sep 17 00:00:00 2001 From: Mustafa Akur Date: Fri, 27 Sep 2024 09:50:13 -0700 Subject: [PATCH] Simplifications --- .../src/windows/bounded_window_agg_exec.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs b/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs index 001e134581c0..95f6b161410f 100644 --- a/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs +++ b/datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs @@ -257,17 +257,11 @@ impl ExecutionPlan for BoundedWindowAggExec { fn required_input_ordering(&self) -> Vec> { let partition_bys = self.window_expr()[0].partition_by(); let order_keys = self.window_expr()[0].order_by(); - if self.input_order_mode != InputOrderMode::Sorted - || self.ordered_partition_by_indices.len() >= partition_bys.len() - { - let partition_bys = self - .ordered_partition_by_indices - .iter() - .map(|idx| &partition_bys[*idx]); - vec![calc_requirements(partition_bys, order_keys)] - } else { - vec![calc_requirements(partition_bys, order_keys)] - } + let partition_bys = self + .ordered_partition_by_indices + .iter() + .map(|idx| &partition_bys[*idx]); + vec![calc_requirements(partition_bys, order_keys)] } fn required_input_distribution(&self) -> Vec {