npaincomplet commented on code in PR #5267:
URL: https://github.com/apache/calcite/pull/5267#discussion_r4034703076
##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdSelectivity.java:
##########
@@ -180,14 +180,29 @@ protected RelMdSelectivity() {
final List<RexNode> notPushable = new ArrayList<>();
final List<RexNode> pushable = new ArrayList<>();
RelOptUtil.splitFilters(
- rel.getGroupSet(),
+ ImmutableBitSet.range(rel.getGroupCount()),
predicate,
pushable,
notPushable);
final RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
RexNode childPred =
RexUtil.composeConjunction(rexBuilder, pushable, true);
+ if (childPred != null) {
Review Comment:
Yes there is the same class of bug in RelMdDistinctRowCount. At first I was
tracking both Selectivity's and DistinctRowCount's bugs in CALCITE-7687 (this
PR's ticket)
I decided to narrow the ticket's scope to RelMdSelectivity, and make another
ticket for RelMdDistinctRowCount.
I haven't created the ticket for RelMdDistinctRowCount yet.
After this PR is merged, I won't have much time to work on Calcite, so feel
free to take over if time allows.
--
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]