chunweilei commented on a change in pull request #1678: [CALCITE-3618] 
WindowedAggRelSplitter - correct isDependent() checking
URL: https://github.com/apache/calcite/pull/1678#discussion_r360355922
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rules/ProjectToWindowRule.java
 ##########
 @@ -336,7 +336,7 @@ private boolean isDependent(final DirectedGraph<Integer, 
DefaultEdge> graph,
         visited.add(source);
         for (DefaultEdge e : graph.getOutwardEdges(source)) {
           int target = (int) e.target;
-          if (rank.get(target) < rank.get(ordinal1)) {
+          if (rank.get(target) <= rank.get(ordinal1)) {
             dfs.push(target);
 
 Review comment:
   Good catch~

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