zabetak commented on code in PR #4226:
URL: https://github.com/apache/calcite/pull/4226#discussion_r1982902864


##########
core/src/main/java/org/apache/calcite/rex/RexUtil.java:
##########
@@ -2826,6 +2826,21 @@ private CorrelationFinder() {
     @Override public Void visitCorrelVariable(RexCorrelVariable var) {
       throw Util.FoundOne.NULL;
     }
+
+    @Override public Void visitSubQuery(RexSubQuery subQuery) {
+      if (!deep) {
+        return null;
+      }
+
+      for (RexNode operand : subQuery.operands) {
+        operand.accept(this);
+      }
+
+      if (!RelOptUtil.getVariablesUsed(subQuery.rel).isEmpty()) {
+        throw Util.FoundOne.NULL;

Review Comment:
   My bad, I rushed a bit through the code and didn't realize that it was a 
full-blown RelNode visitor. The changes here do make sense now.



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