This is an automated email from the ASF dual-hosted git repository.
hyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push:
new 9693817 [CALCITE-3287] Union in RelMdRowCount.java doesn't take into
account 'union all' (Hong Shen)
9693817 is described below
commit 9693817df9421fda9a727d03b225f686f5393def
Author: 沈洪 <[email protected]>
AuthorDate: Sun Aug 25 21:30:52 2019 +0800
[CALCITE-3287] Union in RelMdRowCount.java doesn't take into account 'union
all' (Hong Shen)
Close #1410
---
core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java
index 0550e61..53784f7 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdRowCount.java
@@ -91,6 +91,9 @@ public class RelMdRowCount
}
rowCount += partialRowCount;
}
+ if (!rel.all) {
+ rowCount *= 0.5;
+ }
return rowCount;
}