Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18705 )

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


Patch Set 6:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18705/6/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/18705/6/fe/src/main/java/org/apache/impala/analysis/Analyzer.java@3178
PS6, Line 3178:   public Set<TupleDescriptor> materializeSlots(List<Expr> 
exprs, boolean areJoinOnConds) {
I think that it would be better to keep a  materializeSlots(List<Expr> exprs) 
overload that calls this function with false argument. This would reduce the 
size of this change.

Another solution would be to create another function that only deals with the 
join case.


http://gerrit.cloudera.org:8080/#/c/18705/6/testdata/workloads/functional-planner/queries/PlannerTest/outer-join-elimination.test
File 
testdata/workloads/functional-planner/queries/PlannerTest/outer-join-elimination.test:

http://gerrit.cloudera.org:8080/#/c/18705/6/testdata/workloads/functional-planner/queries/PlannerTest/outer-join-elimination.test@1
PS6, Line 1: select catalog_sales.cs_item_sk, catalog_sales.cs_order_number
Can you add a few more tests? I was thinking about the following cases:
- the column in the join condition from the left table also occurs in the 
select list
- a column from the right side is also used in the where clause (we should not 
eliminate the join in this case)
- the join happens in an inline view or with clause
- see what happens in case of right join (even if it is unoptimized)
- see what happens in case of full join (even if it is unoptimized)
- see what happens if there are more than 2 tables joined


Also, these queries could be also tested in an EE test to ensure that that the 
optimization does not change the results.



--
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: comment
Gerrit-Change-Id: If2e68263a029ac84a4f35b0846b22aa42d7ceece
Gerrit-Change-Number: 18705
Gerrit-PatchSet: 6
Gerrit-Owner: Jian Zhang <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Xiang Yang <[email protected]>
Gerrit-Comment-Date: Wed, 28 Sep 2022 11:41:35 +0000
Gerrit-HasComments: Yes

Reply via email to