Qifan Chen has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16266 )

Change subject: IMPALA-5022 part 1/2: Outer join simplification
......................................................................


Patch Set 16:

(5 comments)

Looks good to me!

http://gerrit.cloudera.org:8080/#/c/16266/16//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/16266/16//COMMIT_MSG@9
PS16, Line 9: As a general rule, an outer join can be converted to an inner 
join if
            : there is a condition on the inner table that filters out 
non‑matching
            : rows. In a left outer join, the right table is the inner table, 
while
            : it is the left table in a right outer join. In a full outer join, 
both
            : tables are inner tables. Conditions that are FALSE for nulls are
            : referred to as null filtering conditions, and these are the 
conditions
            : that enable the outer‑to‑inner join conversion to be made.
Maybe reworded as

"Outer joins in SQL can return rows with certain columns filled with NULLs when 
a match can not be found. However, such rows can be rejected by null-rejecting 
predicates. The conditions in a null-rejecting predicate that are always 
evaluated to FALSE for NULLs are referred to as null-filtering conditions.

In general, an outer join can be converted to an inner join if
there exist null-filtering conditions on the inner tables. In a left outer 
join, the right table is the inner table, while
in a right outer join it is the left table. In a full outer join, both tables 
are inner tables."


http://gerrit.cloudera.org:8080/#/c/16266/16//COMMIT_MSG@50
PS16, Line 50:
I think we need to add a high-level description of what work is done in this 
commit. And also what will be the part 2 work.


http://gerrit.cloudera.org:8080/#/c/16266/13/fe/src/main/java/org/apache/impala/analysis/Analyzer.java
File fe/src/main/java/org/apache/impala/analysis/Analyzer.java:

http://gerrit.cloudera.org:8080/#/c/16266/13/fe/src/main/java/org/apache/impala/analysis/Analyzer.java@3277
PS13, Line 3277:    */
               :   private boolean isNullableConjunct(Expr e, List<TupleId> 
tupleIds) {
               :     // A clause like "t1.v1 IS NOT NULL OR t2.v2 IS NOT NULL" 
and t1 in 'tupleIds' does
               :     // not prove that t1.v1 can't be NULL, because when t2.v2 
IS NOT NULL, t1.v1 can be
               :     // null. But a clause like "t1.v1 IS NOT NULL OR t1.v2 IS 
NOT NULL" proves that the
               :     // t1 row as a whole can't be all-NULL.
               :     Lis
> I changed to use the set retainAll method, but we should collect all of the
OK. It sounds like test in one shot for t1.id>10 and t2.id<10 or t2.id>50 or 
t2.name='a' will not work.


http://gerrit.cloudera.org:8080/#/c/16266/12/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
File fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java:

http://gerrit.cloudera.org:8080/#/c/16266/12/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java@321
PS12, Line 321: Condition
nit. "Conditional"


http://gerrit.cloudera.org:8080/#/c/16266/12/fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java@327
PS12, Line 327: f
> OK, I see. I changed this as the doc. But I think the 'case' is not Functio
Done



--
To view, visit http://gerrit.cloudera.org:8080/16266
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa7804033fac68e93f33c387dc68ef67f803e93e
Gerrit-Change-Number: 16266
Gerrit-PatchSet: 16
Gerrit-Owner: Xianqing He <hexianqing...@126.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Qifan Chen <qc...@cloudera.com>
Gerrit-Reviewer: Shant Hovsepian <sh...@cloudera.com>
Gerrit-Reviewer: Xianqing He <hexianqing...@126.com>
Gerrit-Comment-Date: Mon, 31 Aug 2020 15:13:09 +0000
Gerrit-HasComments: Yes

Reply via email to