Skip to content

Commit

Permalink
Correct correlated variable detection process
Browse files Browse the repository at this point in the history
  • Loading branch information
suibianwanwank committed Jan 16, 2025
1 parent cb67294 commit 957de76
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.calcite.rel.core.TableFunctionScan;
import org.apache.calcite.rel.core.TableModify;
import org.apache.calcite.rel.core.TableScan;
import org.apache.calcite.rex.RexCorrelVariable;
import org.apache.calcite.rex.RexFieldAccess;
import org.apache.calcite.rex.RexInputRef;
import org.apache.calcite.rex.RexLocalRef;
Expand Down Expand Up @@ -308,7 +309,10 @@ private RelMdColumnOrigins() {}
}

@Override public Void visitFieldAccess(RexFieldAccess fieldAccess) {
throw Util.FoundOne.NULL;
if (fieldAccess.getReferenceExpr() instanceof RexCorrelVariable) {
throw Util.FoundOne.NULL;
}
return null;
}
};
try {
Expand Down

0 comments on commit 957de76

Please sign in to comment.