Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19682 )

Change subject: IMPALA-12006: Improve cardinality estimation for joins 
involving multiple conjuncts
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/19682/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/19682/1/fe/src/main/java/org/apache/impala/planner/JoinNode.java@421
PS1, Line 421:         if 
(analyzer.getQueryOptions().isUse_multiplied_selectivity_for_join()) {
> It would be more flexible to allow a correlation coefficient between 0-1 he
+1 for making this more flexible


http://gerrit.cloudera.org:8080/#/c/19682/3/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/19682/3/fe/src/main/java/org/apache/impala/planner/JoinNode.java@414
PS3, Line 414: checkedMultiply
Hitting the limit seems possible here with big RHS+LHS and could lead to weird 
results when we devide with total_rows.
Maybe we could use a double here or divide with lhsCard and rhsCard instead of 
total_rows?


http://gerrit.cloudera.org:8080/#/c/19682/3/fe/src/main/java/org/apache/impala/planner/JoinNode.java@434
PS3, Line 434:
This seems to be the same logic as in the loop above. I think that it would 
easier to understand if the joinCards were collected in a list first and then a 
loop would combine the values.


http://gerrit.cloudera.org:8080/#/c/19682/3/fe/src/main/java/org/apache/impala/planner/JoinNode.java@443
PS3, Line 443:     Preconditions.checkState(result >= 0);
This could be moved to line 430.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I845d778a58404af834f7501fc8157a5a4b4bcc35
Gerrit-Change-Number: 19682
Gerrit-PatchSet: 1
Gerrit-Owner: Aman Sinha <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Wed, 05 Apr 2023 15:56:25 +0000
Gerrit-HasComments: Yes

Reply via email to