zabetak commented on code in PR #4226:
URL: https://github.com/apache/calcite/pull/4226#discussion_r1980980081
##########
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:
The new condition mainly prevents filter push-down for **non-correlated**
sub-queries.
I get the impression that correlated sub-queries are already detected just
by using `RexUtil.containsCorrelation`. The `CorrelationFinder` seems to
traverse also sub-query expressions. Am I missing something?
--
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]