zzwqqq commented on code in PR #5385:
URL: https://github.com/apache/calcite/pull/5385#discussion_r4534575645


##########
core/src/main/java/org/apache/calcite/sql2rel/CorrelateProjectExtractor.java:
##########
@@ -107,17 +108,16 @@ private static boolean isDirectFieldAccess(RexNode node, 
CorrelationId id) {
     RelNode left = correlate.getLeft().accept(this);
     RelNode right = correlate.getRight().accept(this);
     int oldLeft = left.getRowType().getFieldCount();
-    // Find the correlated expressions from the right side that can be moved 
to the left
-    Set<RexNode> callsWithCorrelationInRight =
-        findCorrelationDependentCalls(correlate.getCorrelationId(), right);
-    // Only direct field accesses on the correlation variable, such as
-    // $cor0.DEPTNO, are left in place. A nested field access, such as
-    // $cor0.REC.DEPTNO, is extracted
-    boolean isTrivialCorrelation =
-        callsWithCorrelationInRight.stream()
-            .allMatch(exp -> isDirectFieldAccess(exp, 
correlate.getCorrelationId()));
-    // Early exit condition
-    if (isTrivialCorrelation) {
+    final Map<RexNode, Integer> expressions = new LinkedHashMap<>();

Review Comment:
   Thanks. I've added some.



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