You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2019/08/24 00:05:19 UTC

[Impala-ASF-CR] WIP: IMPALA-7604: part 2: fixes for AggregationNode cardinality

Hello Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14132

to look at the new patch set (#2).

Change subject: WIP: IMPALA-7604: part 2: fixes for AggregationNode cardinality
......................................................................

WIP: IMPALA-7604: part 2: fixes for AggregationNode cardinality

* Use saturating arithmetic in Expr.getNumDistinctValues() to
  avoid overflows.
* Avoid double-adding with checkedAdd()
* Fix incorrect logic with multiple groups - each group cannot
  return more than the input rows, but with multiple groups
  it can add up to more than the input rows.

Testing:
Updated planner tests from part 1 to reflect bugfixes.

Added targeted cardinality tests to verify behaviour
with and without stats.

Change-Id: Ieed41d60c0e0dfeca64035e919cb8c28a054a9ab
---
M fe/src/main/java/org/apache/impala/analysis/Expr.java
M fe/src/main/java/org/apache/impala/planner/AggregationNode.java
M fe/src/test/java/org/apache/impala/planner/CardinalityTest.java
M testdata/workloads/functional-planner/queries/PlannerTest/card-agg.test
4 files changed, 128 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/32/14132/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14132
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieed41d60c0e0dfeca64035e919cb8c28a054a9ab
Gerrit-Change-Number: 14132
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>