shenh062326 commented on a change in pull request #1410: [CALCITE-3287] Let
getRowCount for union in RelMdRowCount.java take into account 'union all'
URL: https://github.com/apache/calcite/pull/1410#discussion_r317424866
##########
File path:
core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java
##########
@@ -83,15 +83,7 @@ public Double getRowCount(RelSubset subset,
RelMetadataQuery mq) {
}
public Double getRowCount(Union rel, RelMetadataQuery mq) {
- double rowCount = 0.0;
- for (RelNode input : rel.getInputs()) {
- Double partialRowCount = mq.getRowCount(input);
- if (partialRowCount == null) {
- return null;
- }
- rowCount += partialRowCount;
- }
- return rowCount;
+ return rel.estimateRowCount(mq);
Review comment:
Thanks @hsyuan , I will fix it.
----------------------------------------------------------------
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]
With regards,
Apache Git Services