xiedeyantu commented on code in PR #4346:
URL: https://github.com/apache/calcite/pull/4346#discussion_r2067559445
##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java:
##########
@@ -218,8 +214,30 @@ public RelOptPredicateList getPredicates(Project project,
for (RexNode r : inputInfo.pulledUpPredicates) {
RexNode r2 = projectPredicate(rexBuilder, input, r, columnsMapped);
if (!r2.isAlwaysTrue()) {
- r2 = r2.accept(new RexPermuteInputsShuttle(m, input));
- projectPullUpPredicates.add(r2);
+ ImmutableBitSet fields = RelOptUtil.InputFinder.bits(r2);
+ // If r2 cannot find input (such as SubQuery),
+ // it will directly return without adjusting mapping.
+ if (fields.isEmpty()) {
+ projectPullUpPredicates.add(r2);
+ continue;
+ }
+ // Using Map<Integer, BitSet>, the result will be
Review Comment:
I updated the doc and removed the annotations. I tested locally that both
java8 and java17 were successfully and to see if ci can succeed.
--
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]