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

Change subject: IMPALA-7942: Add query hints for cardinalities and selectivities
......................................................................


Patch Set 7:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/18023/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18023/3//COMMIT_MSG@24
PS3, Line 24:   * InPredicate
> I meant to say in primitive form.
Done


http://gerrit.cloudera.org:8080/#/c/18023/3//COMMIT_MSG@49
PS3, Line 49: ' with two 'BinaryPredicate', if
            : set hint
> Thanks a lot for the research. It is great.
Thanks for you deep research, Qifan. As you mentioned above:
1. For predicate 'int_col > 1 and smallint_col > 3', conjuncts are 'int_col > 
1' and 'smallint_col > 3', which are two BinaryPredicate;
2. For predicate 'int_col > 1 or smallint_col > 3', conjuncts is 'int_col > 1 
or smallint_col > 3', which is a CompoundPredicate;
If we only handle a subset of complex expressions, this will confused users. 
When can we use selectivity hints for a compound predicates? I think it is 
difficult for users to judge which situation selectivity is valid, the learning 
cost is very high.
Besides, if we compute each child predicates' selectivity separately, we can 
reuse these in different queries, for example 'int_col=1 and smallint_col=2' 
and 'int_col=1 and bool_col=0', since we believe that hot predicates always 
appear in many queries.
If set selectivity for a compound predicate is useful in your environment, we 
can consider this carefully in a sub-task as I said. I think handle a subset of 
complex expressions is not very suitable.

I listed three cases in commit message which are not supported:  
  * select col from t where (a=1) /* +SELECTIVITY(0.5) */;
  * select col from t where (a=1 and b<2) /* +SELECTIVITY(0.5) */;
  * select col from t1 where exists (...) /* +SELECTIVITY(0.5) */;


http://gerrit.cloudera.org:8080/#/c/18023/3//COMMIT_MSG@51
PS3, Line 51: value for two 'BinaryPredicate' children.
            :
            : Testing:
            : - Added new fe tests in 'PlannerTest'
> See my comment on complex predicates above.
Done



--
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: 7
Gerrit-Owner: wangsheng <[email protected]>
Gerrit-Reviewer: Amogh Margoor <[email protected]>
Gerrit-Reviewer: Fucun Chu <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Qifan Chen <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: wangsheng <[email protected]>
Gerrit-Comment-Date: Wed, 15 Dec 2021 07:50:53 +0000
Gerrit-HasComments: Yes

Reply via email to