[ https://issues.apache.org/jira/browse/CALCITE-3909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-3909: ------------------------------------ Labels: pull-request-available (was: ) > RelMdMinRowCount doesn't take into account UNION DISTINCT > ---------------------------------------------------------- > > Key: CALCITE-3909 > URL: https://issues.apache.org/jira/browse/CALCITE-3909 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.22.0 > Reporter: Chunwei Lei > Assignee: Chunwei Lei > Priority: Major > Labels: pull-request-available > > When computing minRowCount for Union, it doesn't task into account UNION > DISTINCT. > {code:java} > public Double getMinRowCount(Union rel, RelMetadataQuery mq) { > double rowCount = 0.0; > for (RelNode input : rel.getInputs()) { > Double partialRowCount = mq.getMinRowCount(input); > if (partialRowCount != null) { > rowCount += partialRowCount; > } > } > return rowCount; > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)