Qifan Chen 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: (1 comment) http://gerrit.cloudera.org:8080/#/c/18023/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/18023/3//COMMIT_MSG@49 PS3, Line 49: ' with two 'BinaryPredicate', if : set hint > Thanks for you deep research, Qifan. As you mentioned above: "If we only handle a subset of complex expressions, this will confused users.". Not sure the argument holds :-) as currently the patch allows selectivity hints to be applied to a subset of predicates anyway. On paper, suppose we have a tree represent a predicate where non-leaf nodes are operators, and leaf nodes columns/values etc. Let us say selectivity is the property of any nodes in the tree. Then a selectivity hint at node <n> just specifies that selectivity value and overrides the need to compute it at all from the subtree rooted at <n>. The selectivity for the entire predicate can be computed as before. This view is a little bit different than the logic in the patch, and maybe can serve as the model for computation with complex predicates. For predicate 'int_col > 1 and smallint_col > 3'. If there is a hint for the whole predicate, can we wrap the whole thing in CompoundPredicate()? If a hint is only available for int_col >1, then we use the form of two BinaryPredicates, and reply on PlanNode. BinaryPredicate() to compute a final score. Note that we may not apply the backoff logic there for a conjunct with hint. -- 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 17:02:17 +0000 Gerrit-HasComments: Yes
