berkaysynnada commented on code in PR #17684:
URL: https://github.com/apache/datafusion/pull/17684#discussion_r2375780036


##########
datafusion/physical-plan/src/windows/mod.rs:
##########
@@ -467,23 +493,44 @@ pub(crate) fn window_equivalence_properties(
                 // utilize set-monotonicity since the set shrinks as the frame
                 // boundary starts "touching" the end of the table.
                 else if frame.is_causal() {
-                    let args_all_lexs = sliding_expr
-                        .get_aggregate_expr()
-                        .expressions()
-                        .into_iter()
-                        .map(sort_options_resolving_constant)
-                        .multi_cartesian_product();

Review Comment:
   
https://github.com/apache/datafusion/blob/6ec14e9e488c2b5bd57114d1b3bf3a798fc579ad/datafusion/core/tests/physical_optimizer/enforce_sorting.rs#L2470
 highly covers the correctness issue, but for the performance concerns, a 
similar regression test should be added, like this:
   
   ``` 
       SUM(c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9 + c10 + ... + cN) 
           OVER (ORDER BY c1, c2, ... cN and a causal window)
   ```



-- 
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]

Reply via email to