Qifan Chen has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18023 )

Change subject: IMPALA-7942 (part 2): Add query hints for predicate 
selectivities
......................................................................


Patch Set 29:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/18023/29/fe/src/main/java/org/apache/impala/analysis/Expr.java
File fe/src/main/java/org/apache/impala/analysis/Expr.java:

http://gerrit.cloudera.org:8080/#/c/18023/29/fe/src/main/java/org/apache/impala/analysis/Expr.java@1067
PS29, Line 1067: // Selectivity hint cannot be set. If Predicate been set 
selectivity hint, we return
               :       // itself directly, such as CompoundPredicate. 
Otherwise, hint value will missing.
This comment is not accurate and should  be removed. The original comment from 
Base version should be restored here.

It looks to me the original form of getConjuncts() should work fine even when 
selectivity hints exist in the tree anchored at <this>. This is because both 
child(0) and child(1) should be a <Predicate> when <this> is a 
CompoundPredicate.  Note a Predicate contains the selectivityHint_ as the new 
data member.

If the above is true, then we do not need getLocalConjuncts() at all.

IMHO, when selectivity hints are supplied, we should let them flow to the rest 
of the compilation phases as a single piece of data to represent the moment of 
truth. Allowing two or more representations can introduce unnecessary 
complexity in the down stream.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2776b9bbd878b8a21d9c866b400140a454f59e1b
Gerrit-Change-Number: 18023
Gerrit-PatchSet: 29
Gerrit-Owner: wangsheng <[email protected]>
Gerrit-Reviewer: Amogh Margoor <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Qifan Chen <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Xiang Yang <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: wangsheng <[email protected]>
Gerrit-Comment-Date: Tue, 11 Apr 2023 13:46:31 +0000
Gerrit-HasComments: Yes

Reply via email to