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 8:
"Besides, we can not modify like this directly yet:
| predicate:p selectivity_hint:h
{:
if (hint != null) {
p.setSelectivityHint(Double.valueOf(hint.getArgs().get(0)));
}
RESULT = p;
:}
Since 'predicate' is an 'Expr', instead of 'Predicate'. 'setSelectivityHint'
method is belong to 'Predicate'. Here is import statement:
nonterminal Expr predicate, bool_test_expr;"
I think we should verify p to be a Predicate first.
If there exists a hint {
If (p instanceof Predicate) {
((Predicate)p).setSelectivityHint(Double.valueOf(hint.getArgs().get(0)));
} else {
// throw an error
}
}
--
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: 8
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: Tue, 22 Mar 2022 13:01:01 +0000
Gerrit-HasComments: No