jonathanc-n commented on code in PR #16234: URL: https://github.com/apache/datafusion/pull/16234#discussion_r2122403231
########## datafusion/physical-expr/src/window/aggregate.rs: ########## @@ -85,6 +88,18 @@ impl PlainAggregateWindowExpr { ); } } + + fn is_window_constant(order_by: &LexOrdering, window_frame: &WindowFrame) -> bool { Review Comment: This is nice, I think we should have a comment to explain why ```suggestion // Returns true if every row in the partition has the same window frame. This allows // for preventing bound + function calculation for every row due to the values being the // same. // // This occurs when both bounds fall under either condition below: // 1. Bound is unbounded (`Preceding` or `Following`) // 2. Bound is `CurrentRow` while using `Range`units with no order by clause fn is_window_constant(order_by: &LexOrdering, window_frame: &WindowFrame) -> bool { ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org