suibianwanwank commented on code in PR #4574:
URL: https://github.com/apache/calcite/pull/4574#discussion_r2420690915
##########
core/src/main/java/org/apache/calcite/rel/rules/SubQueryRemoveRule.java:
##########
@@ -895,12 +895,8 @@ private static void matchFilter(SubQueryRemoveRule rule,
LogicVisitor.find(RelOptUtil.Logic.TRUE, ImmutableList.of(c), e);
final Set<CorrelationId> variablesSet =
RelOptUtil.getVariablesUsed(e.rel);
- // Filter without variables could be handled before this change, we do
not want
- // to break it yet for compatibility reason.
- if (!filterVariablesSet.isEmpty()) {
- // Only consider the correlated variables which originated from this
sub-query level.
- variablesSet.retainAll(filterVariablesSet);
- }
+ // Only consider the correlated variables which originated from this
sub-query level.
Review Comment:
Could we perhaps use `filter.getVariablesSet()` directly, or is there a
reason not to?
--
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]