jinxing64 commented on a change in pull request #1460: [CALCITE-3352] 
ProjectToWindowRule sets wrong collation on generated Window
URL: https://github.com/apache/calcite/pull/1460#discussion_r326972280
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rules/ProjectToWindowRule.java
 ##########
 @@ -165,6 +169,18 @@ public ProjectToLogicalProjectAndWindowRule(
       final CalcRelSplitter transform = new WindowedAggRelSplitter(calc,
           call.builder()) {
         @Override protected RelNode handle(RelNode rel) {
+          if (rel instanceof LogicalProject && rel.getInput(0) instanceof 
LogicalWindow) {
 
 Review comment:
   If we derive the collation of LogicalWindow in 
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/rules/ProjectToWindowRule.java#L249,
 this change might be not necessary.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to