mihaibudiu commented on code in PR #4998:
URL: https://github.com/apache/calcite/pull/4998#discussion_r3399095013
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -2629,6 +2630,55 @@ private RexNode createCaseExpression(
return literal;
}
+ @Override public RexNode visitOver(RexOver over) {
+ // Collect correlation fields that are referenced directly by the window
+ // expression. They need to be added to the window partition keys so that
+ // decorrelation does not widen the window computation scope.
Review Comment:
Could you show here a plan fragment before and after the rewrite?
--
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]