Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11901 )

Change subject: IMPALA-7528: Fix division by zero when computing cardinalities
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/11901/1/fe/src/main/java/org/apache/impala/planner/JoinNode.java
File fe/src/main/java/org/apache/impala/planner/JoinNode.java:

http://gerrit.cloudera.org:8080/#/c/11901/1/fe/src/main/java/org/apache/impala/planner/JoinNode.java@368
PS1, Line 368:       if (lhsAdjNdv <= 0 && rhsAdjNdv <= 0) return 0;
Would it make sense to instead treat the NDV as 1 in this case? Since if the 
NDV estimate is lower, we expect the join cardinality to be higher.

I.e. Math.max(lhsAdjNdv, rhsAdjNdv) becomes Math.max(1, Math.max(lhsAdjNdv, 
rhsAdjNdv))


http://gerrit.cloudera.org:8080/#/c/11901/1/fe/src/test/java/org/apache/impala/planner/PlannerTest.java
File fe/src/test/java/org/apache/impala/planner/PlannerTest.java:

http://gerrit.cloudera.org:8080/#/c/11901/1/fe/src/test/java/org/apache/impala/planner/PlannerTest.java@713
PS1, Line 713:     checkCardinality(query, 0, 1);  }
newline



--
To view, visit http://gerrit.cloudera.org:8080/11901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieedd51d3ad6131a4ea2a5883f05104e6a0f2cd14
Gerrit-Change-Number: 11901
Gerrit-PatchSet: 1
Gerrit-Owner: Bikramjeet Vig <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Comment-Date: Wed, 07 Nov 2018 20:28:03 +0000
Gerrit-HasComments: Yes

Reply via email to