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

Change subject: IMPALA-11485: Pushdown LIMIT through UNION and LEFT/RIGHT OUTER 
JOIN
......................................................................


Patch Set 5:

(2 comments)

Started looking at the change, first from the aspect of correctness.

Thanks for working on this, great optimization!

http://gerrit.cloudera.org:8080/#/c/18862/5/fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
File fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java:

http://gerrit.cloudera.org:8080/#/c/18862/5/fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java@368
PS5, Line 368: UNION
Shouldn't we push down LIMIT for UNION ALL only, and not for UNION? UNION also 
filters duplicates for children, so a child that returns 1000 rows may lead to 
only 1 row in the output.


http://gerrit.cloudera.org:8080/#/c/18862/5/testdata/workloads/functional-planner/queries/PlannerTest/limit-pushdown-union.test
File 
testdata/workloads/functional-planner/queries/PlannerTest/limit-pushdown-union.test:

http://gerrit.cloudera.org:8080/#/c/18862/5/testdata/workloads/functional-planner/queries/PlannerTest/limit-pushdown-union.test@8
PS5, Line 8: limit 5;
Can you also add a test with an OFFSET clause?

I think that we should push down LIMIT + OFFSET as limit in that case, as 
simply pushing down limit can lead to returning too few rows from child nodes.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5d040c0a98e60639d7ce4b25ecf07a859c8a32c
Gerrit-Change-Number: 18862
Gerrit-PatchSet: 5
Gerrit-Owner: Baike Xia <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Baike Xia <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jian Zhang <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Sun, 09 Oct 2022 18:58:02 +0000
Gerrit-HasComments: Yes

Reply via email to