libenchao commented on code in PR #2968:
URL: https://github.com/apache/calcite/pull/2968#discussion_r1038972799
##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -2442,18 +2472,27 @@ private void convertUnnest(Blackboard bb, SqlCall call,
@Nullable List<String> f
});
RelNode child =
(null != bb.root) ? bb.root : LogicalValues.createOneRow(cluster);
+
+ RelNode newChild;
+ final CorrelationUse correlationUse = getCorrelationUse(bb, child);
+ if (correlationUse != null && !(child instanceof Collect)) {
+ newChild = addCorrelation(child, correlationUse, relBuilder);
Review Comment:
I'm not sure this is the right place to add the correlation variable.
Actually the correlation variable should be in the join node. What do you think
about this?
--
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]