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.
> Hi Qifan. What do you mean 'Note a Predicate contains the selectivityHint_
Option 1) probably will exclude lots of common predicates from utilizing this 
useful feature. But without some study, we may not get the right answer. So my 
vote for this patch is 1).

Option 2) sounds like a good starting point to address 1).  But we need to find 
out how the selectivity at AND predicate is computed from child(0) and 
child(1). From that we may be able to back fit the selectivity hint from the 
AND predicate down. This will be for the general cases where  SELECT_HINT(AND) 
!= -1.

For the special case:  SELECT_HINT(AND) = -1, then just store child(0) and 
child(1) in the list without changing their selectivity hint (even being -1) at 
all.



--
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 20:03:31 +0000
Gerrit-HasComments: Yes

Reply via email to