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


##########
core/src/main/java/org/apache/calcite/rel/rules/FilterProjectTransposeRule.java:
##########
@@ -213,7 +213,8 @@ protected FilterProjectTransposeRule(
   public interface Config extends RelRule.Config {
     Config DEFAULT = ImmutableFilterProjectTransposeRule.Config.of()
         .withOperandFor(Filter.class,
-            f -> !RexUtil.containsCorrelation(f.getCondition()),
+            f -> !RexUtil.containsCorrelation(f.getCondition())
+                && !RexUtil.SubQueryFinder.containsSubQuery(f),

Review Comment:
   @asolimando @zabetak Based on the above discussion, I have enhanced 
RexUtil.containsCorrelation. If the test goes well, I will update the PR again. 
Maybe we can only push down the non-correlated sub-queries.



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