Hello Quanlong Huang, Csaba Ringhofer, Impala Public Jenkins, Xiang Yang,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/18705

to look at the new patch set (#8).

Change subject: IMPALA-11417: Support outer join elimination optimization
......................................................................

IMPALA-11417: Support outer join elimination optimization

When two tables are outer joined but only fields from the outer side
table are used and the join key of the inner side table is guaranteed to
be unique, the query can be simplified to only scan the outer table:

    drop table if exists t;
    drop table if exists s;
    create table t(sid bigint, value bigint);
    create table s(id bigint, value bigint, primary key(id));

    -- the test SQL:
    select t.* from t left join s on t.sid = s.id;

The above query can be simplified to:

    select t.* from t;

This optimization utilizes the primary key constraint when creating join
nodes, eliminates the inner side when the join key on inner side is the
primary key and only the slots from the outer side are used by the
parent.

Change-Id: If2e68263a029ac84a4f35b0846b22aa42d7ceece
Signed-off-by: Jian Zhang <zjsar...@gmail.com>
---
M fe/src/main/java/org/apache/impala/analysis/AggregateInfo.java
M fe/src/main/java/org/apache/impala/analysis/AnalyticInfo.java
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/DescriptorTable.java
M fe/src/main/java/org/apache/impala/analysis/SlotDescriptor.java
M fe/src/main/java/org/apache/impala/planner/JoinNode.java
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
A 
testdata/workloads/functional-planner/queries/PlannerTest/outer-join-elimination.test
9 files changed, 287 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/05/18705/8
--
To view, visit http://gerrit.cloudera.org:8080/18705
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If2e68263a029ac84a4f35b0846b22aa42d7ceece
Gerrit-Change-Number: 18705
Gerrit-PatchSet: 8
Gerrit-Owner: Jian Zhang <zjsar...@gmail.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>
Gerrit-Reviewer: Xiang Yang <yx91...@126.com>

Reply via email to