xiedeyantu commented on code in PR #4878:
URL: https://github.com/apache/calcite/pull/4878#discussion_r3069554148
##########
core/src/main/java/org/apache/calcite/rel/rules/SetOpToFilterRule.java:
##########
@@ -143,7 +153,14 @@ private static void match(RelOptRuleCall call) {
for (int i = 1; i < inputs.size(); i++) {
final RelNode input = inputs.get(i).stripped();
- final Pair<RelNode, @Nullable RexNode> pair =
extractSourceAndCond(input);
+ boolean isSorted = false;
+ final List<RelCollation> inputCollations = mq.collations(input);
Review Comment:
@asolimando I use `mq` to check if the input is sorted. If the input is
sorted, a sub-plan that has both limit/offset and sort is safe to be rewritten.
Please check if this logic matches your suggestion.
--
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]