You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/02/22 11:59:13 UTC

[GitHub] [calcite] rubenada commented on a change in pull request #2302: [CALCITE-4437] The Sort rel should be decorrelated even though it has fetch or limit when it is not inside a Correlate (Thomas Rebele)

rubenada commented on a change in pull request #2302:
URL: https://github.com/apache/calcite/pull/2302#discussion_r580194598



##########
File path: core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java
##########
@@ -429,7 +430,7 @@ protected RexNode removeCorrelationExpr(
         ImmutableSortedMap.of());
   }
 
-  public @Nullable Frame decorrelateRel(Sort rel) {
+  public @Nullable Frame decorrelateRel(Sort rel, boolean isCorVarDefined) {
     //

Review comment:
       Thanks for the feedback @danny0405 .
   I guess it could be possible to keep it in an internal state, but I believe it might be not that simple. For example (if I am not mistaken) if we deal with a Correlate within a Correlate, when the inner one is done, it should not set the state back to "non-correlate" because we are still in the context of the outer one.
   What do you think @thomasrebele  ?




----------------------------------------------------------------
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:
users@infra.apache.org