xiedeyantu commented on code in PR #4691:
URL: https://github.com/apache/calcite/pull/4691#discussion_r2629223642
##########
core/src/main/java/org/apache/calcite/rex/RexUtil.java:
##########
@@ -3191,6 +3192,19 @@ public static List<RexSubQuery> collect(Project project)
{
}
return subQueryCollector.subQueries;
}
+
+ public static List<RexSubQuery> collect(Filter filter) {
Review Comment:
I may not have explained it clearly, but that's roughly the idea.
```
public static List<RexSubQuery> collect(RexNode rex) {
SubQueryCollector subQueryCollector = new SubQueryCollector();
rex.accept(subQueryCollector);
return subQueryCollector.subQueries;
}
```
Just use it like:
```
List<RexSubQuery> subQueries =
RexUtil.SubQueryCollector.collect(filter.getCondition());
List<RexSubQuery> subQueries =
RexUtil.SubQueryCollector.collect(join.getCondition());
```
--
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]