danny0405 commented on a change in pull request #2208:
URL: https://github.com/apache/calcite/pull/2208#discussion_r503626114



##########
File path: core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
##########
@@ -680,6 +677,17 @@ private static void shiftMapping(Map<Integer, Integer> 
mapping, int startIndex,
 
   public Frame getInvoke(RelNode r, RelNode parent) {
     final Frame frame = dispatcher.invoke(r);
+    if (frame != null && parent instanceof Correlate && r instanceof Sort) {

Review comment:
       Finally i changes to check if the sort has a parent, if it does, that 
means the sort is definitely a branch of `Correlate` (if the sort input has 
been rewritten)




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


Reply via email to