Aman Sinha 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 6: (5 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: slots.lhsNumRows(), slots.rhsNumRows(), lhsCard, rhsCard)); > Correct, the result will be somewhere between the multiplied selectivity an Done 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: kState(!eqJoinC > Hitting the limit seems possible here with big RHS+LHS and could lead to we Ack. Changed it to divide by the lhsCard, rhsCard. 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 Refactored this. http://gerrit.cloudera.org:8080/#/c/19682/3/fe/src/main/java/org/apache/impala/planner/JoinNode.java@443 PS3, Line 443: if (corrfactor > 0) { > This could be moved to line 430. I think we still need to check the final result is >=0 since result is getting modified at a couple of places. http://gerrit.cloudera.org:8080/#/c/19682/3/fe/src/main/java/org/apache/impala/planner/JoinNode.java@487 PS3, Line 487: double cumulative_sel = 1.0; > Should we consider multiply the selectivity here too? (if the query option Yes, thanks for pointing this. Added the same logic here. -- 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: 6 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: Sun, 09 Apr 2023 06:25:58 +0000 Gerrit-HasComments: Yes
