Xianqing He has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/18234


Change subject: IMPALA-11008: fix incorrect to propagate inferred predicates
......................................................................

IMPALA-11008: fix incorrect to propagate inferred predicates

It is incorrect to propagate predicates inferred from equi-join
conjuncts into a plan subtree that is on the nullable side of an
outer join if the predicate is not null-filtering condition for
the nullable side.

For example:
select * from (select id is not null and col is null as a from
(select A.id, B.col from A left join B on A.id = B.id) t ) t
where a = 1
Before this patch the inferred predicate (B.id is not null and
B.col is null = 1) is evaluated at the scanner of B. Because the
predicate (A.id is not null and B.col is null = 1) is not
null-filtering condition for B.

Tests:
  - Add plan tests in predicate-propagation.test
  - Add new query tests to verify the correctness of inferred
    predicates propagation
  - Ran the full set of verifications in Impala Public Jenkins

Change-Id: I9e64230f6d0c2b9ef1560186ceba349a5920ccdf
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/predicate-propagation.test
M testdata/workloads/functional-query/queries/QueryTest/outer-joins.test
3 files changed, 256 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/34/18234/3
--
To view, visit http://gerrit.cloudera.org:8080/18234
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e64230f6d0c2b9ef1560186ceba349a5920ccdf
Gerrit-Change-Number: 18234
Gerrit-PatchSet: 3
Gerrit-Owner: Xianqing He <[email protected]>

Reply via email to