Baike Xia has uploaded a new patch set (#18). ( http://gerrit.cloudera.org:8080/18731 )
Change subject: IMPALA-11424: Support pushdown non-equi join predicate from OUTER/INNER JOIN to SCANNODE ...................................................................... IMPALA-11424: Support pushdown non-equi join predicate from OUTER/INNER JOIN to SCANNODE In order to reduce the amount of data read and transmitted, the non-equivalent condition of Join can be pushed to SCAN_NODE. For pushdown of Join non-equi conjuncts, the current qualifications: 1. Only support LEFT_OUTER_JOIN, RIGHT_OUTER_JOIN, INNER_JOIN; 2. For non-equi predicates containing literalExpr, for example: slot >= Literal, slot in Literal list; 3. Push down the predicate for a complex filter condition that contains only one column. For example, cast(A as int) > 10 to push down to SCAN. 4. Currently only the associated predicate operation type is: EQ,LE,LT,GE,GT; 5. Currently only the associated predicate: BinaryPredicate and InPredicate; Pushdown logic: 1. Get the mapping relationship between slot and non-equi conjunct list, and get the mapping relationship between slot and equi conjunct list; 2. For the case where there are equal and non-equi conjuncts in the slot at the same time, calculate the maximum and minimum values of the equi conjuncts; 3. The maximum and minimum values are newly built into binaryPredicate according to non-equi conjunct; 4. Push all binaryPredicates down to a specific scan node; And add new query option as a function switch: ENABLE_NONE_EQUAL_PREDICATE_PUSH_DOWN Change-Id: Ie3ce23cbd7522a209c830504f329b972d67bc263 --- M be/src/service/query-options.cc M be/src/service/query-options.h M common/thrift/ImpalaService.thrift M common/thrift/Query.thrift M fe/src/main/java/org/apache/impala/analysis/Expr.java M fe/src/main/java/org/apache/impala/planner/HashJoinNode.java M fe/src/main/java/org/apache/impala/planner/HdfsScanNode.java M fe/src/main/java/org/apache/impala/planner/ScanNode.java M fe/src/test/java/org/apache/impala/planner/PlannerTest.java M fe/src/test/java/org/apache/impala/planner/PlannerTestBase.java A testdata/workloads/functional-planner/queries/PlannerTest/none-equal-predicate-push-down.test A testdata/workloads/functional-query/queries/QueryTest/none-equal-predicate-push-down.test A tests/query_test/test_none_equi_predicate_pushdown.py 13 files changed, 1,448 insertions(+), 8 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/31/18731/18 -- To view, visit http://gerrit.cloudera.org:8080/18731 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie3ce23cbd7522a209c830504f329b972d67bc263 Gerrit-Change-Number: 18731 Gerrit-PatchSet: 18 Gerrit-Owner: Baike Xia <xiaba...@163.com> Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com> Gerrit-Reviewer: Baike Xia <xiaba...@163.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>