Tim Armstrong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14132 )
Change subject: IMPALA-7604: part 2: fixes for AggregationNode cardinality ...................................................................... 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. Updated other planner tests that changed as a result of this fixed. Ran exhaustive tests. Change-Id: Ieed41d60c0e0dfeca64035e919cb8c28a054a9ab Reviewed-on: http://gerrit.cloudera.org:8080/14132 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- 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 M testdata/workloads/functional-planner/queries/PlannerTest/empty.test M testdata/workloads/functional-planner/queries/PlannerTest/insert-sort-by.test M testdata/workloads/functional-planner/queries/PlannerTest/joins.test M testdata/workloads/functional-planner/queries/PlannerTest/tpcds-all.test 8 files changed, 964 insertions(+), 855 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: Ieed41d60c0e0dfeca64035e919cb8c28a054a9ab Gerrit-Change-Number: 14132 Gerrit-PatchSet: 11 Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Bharath Vissapragada <[email protected]> Gerrit-Reviewer: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
