vlsi commented on a change in pull request #2154:
URL: https://github.com/apache/calcite/pull/2154#discussion_r504475754
##########
File path:
core/src/main/java/org/apache/calcite/rel/metadata/RelMdDistinctRowCount.java
##########
@@ -79,6 +82,37 @@ public Double getDistinctRowCount(RelNode rel,
RelMetadataQuery mq,
return null;
}
+ public Double getDistinctRowCount(TableScan rel, RelMetadataQuery mq,
+ ImmutableBitSet groupKey, RexNode predicate) {
+ final double selectivity = predicate == null ? 1D : mq.getSelectivity(rel,
predicate);
Review comment:
Can `getSelectivity` return null?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]