zabetak commented on code in PR #5231:
URL: https://github.com/apache/calcite/pull/5231#discussion_r4195266506
##########
core/src/main/java/org/apache/calcite/sql2rel/CorrelateProjectExtractor.java:
##########
@@ -115,8 +116,11 @@ private static boolean isDirectFieldAccess(RexNode node,
CorrelationId id) {
boolean isTrivialCorrelation =
callsWithCorrelationInRight.stream()
.allMatch(exp -> isDirectFieldAccess(exp,
correlate.getCorrelationId()));
+ // A nested correlate on the right re-binding the same id owns the refs
below it.
+ boolean rightRebindsCorrelationId =
+ rebindsCorrelationId(right, correlate.getCorrelationId());
Review Comment:
You did well to ping me cause I didn't see the earlier message. Changes look
good!
--
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]