juntaozhang commented on code in PR #4338:
URL: https://github.com/apache/calcite/pull/4338#discussion_r2062591851


##########
core/src/main/java/org/apache/calcite/rel/rules/SortJoinTransposeRule.java:
##########
@@ -116,13 +121,26 @@ public SortJoinTransposeRule(Class<? extends Sort> 
sortClass,
               mq, join.getLeft(), joinInfo.leftSet())) {
         return false;
       }
+      if (alreadyPushedDown(join.getRight())) {
+        return false;
+      }
     } else {
       return false;
     }
 
     return true;
   }
 
+  // Returns true if the sort has already been pushed down
+  private boolean alreadyPushedDown(RelNode rel) {

Review Comment:
   Not sure if I understood it correctly, feedback is welcome.



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

Reply via email to