mihaibudiu commented on code in PR #4734:
URL: https://github.com/apache/calcite/pull/4734#discussion_r2677318500
##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java:
##########
@@ -191,9 +191,10 @@ public Double getRowCount(Calc rel, RelMetadataQuery mq) {
return sampleRate * inputRowCount;
}
- // Covers Converter, Interpreter
+ // Covers Converter, Interpreter, and custom SingleRel subclasses
+ // Delegates to estimateRowCount() to allow subclasses to provide custom
estimates
public @Nullable Double getRowCount(SingleRel rel, RelMetadataQuery mq) {
- return mq.getRowCount(rel.getInput());
+ return rel.estimateRowCount(mq);
Review Comment:
I haven't checked that this indeed eventually does the same thing as the
original when it's the right thing, but the description in the JIRA argues that
this is correct.
--
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]