[
https://issues.apache.org/jira/browse/CALCITE-3909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chunwei Lei resolved CALCITE-3909.
----------------------------------
Fix Version/s: 1.23.0
Resolution: Fixed
Fixed inĀ
[https://github.com/apache/calcite/commit/933e9c7e5b669f4f4b7355294e416800c48275f4].
> 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
> Fix For: 1.23.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> 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)