akurmustafa commented on code in PR #12656:
URL: https://github.com/apache/datafusion/pull/12656#discussion_r1778915642
##########
datafusion/physical-plan/src/windows/bounded_window_agg_exec.rs:
##########
@@ -257,17 +257,11 @@ impl ExecutionPlan for BoundedWindowAggExec {
fn required_input_ordering(&self) -> Vec<Option<LexRequirement>> {
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)]
Review Comment:
when `self.input_order_mode` is `InputOrderMode::Sorted`, it is guaranteed
that `self.ordered_partition_by_indices.len() == partition_bys.len()`. Hence,
`else` branch was never being triggerred in the previous version. I think, that
check is redundant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]