Riza Suminto has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20040


Change subject: IMPALA-12200: Cap stats NDV from SetOperationStmt.createMetadata
......................................................................

IMPALA-12200: Cap stats NDV from SetOperationStmt.createMetadata

Union operator will create merged ColumnStats at
SetOperationStmt.createMetadata where it adds all ColumnStats from its
input children. One of the stats being accumulated is NDV (num distinct
value). There is an opportunity to lower the resulting NDV if all source
expression is referring to the same column. This lower NDV can benefit
Aggregation node on top of the Union node because it can lower
cardinality and memory estimate of the Aggregation node.

Testing:
- Pass core tests.

Change-Id: Ic0bb2eff5005fdfb11adf31499214c63dd552c05
---
M fe/src/main/java/org/apache/impala/analysis/SetOperationStmt.java
M fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds-processing-cost.test
3 files changed, 88 insertions(+), 23 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/40/20040/1
--
To view, visit http://gerrit.cloudera.org:8080/20040
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0bb2eff5005fdfb11adf31499214c63dd552c05
Gerrit-Change-Number: 20040
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <[email protected]>

Reply via email to