Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16942 )
Change subject: IMPALA-10296: Fix analytic limit pushdown when predicates are present ...................................................................... Patch Set 8: (1 comment) http://gerrit.cloudera.org:8080/#/c/16942/8/fe/src/main/java/org/apache/impala/planner/AnalyticEvalNode.java File fe/src/main/java/org/apache/impala/planner/AnalyticEvalNode.java: http://gerrit.cloudera.org:8080/#/c/16942/8/fe/src/main/java/org/apache/impala/planner/AnalyticEvalNode.java@585 PS8, Line 585: if (!(pred.getOp() == BinaryPredicate.Operator.EQ || I think we need to adjust the handling of EQ here, I don't think we can push when the value is >= 1 since the predicate will filter out an arbitrary number of rows (maybe you can be clever in some cases, but I think that's generally true). E.g. select * from ( select d_date, i_item_id, ss_list_price, rank() over (partition by d_date order by ss_list_price desc) rnk from store_sales ss join item i on ss_item_sk = i_item_sk join date_dim d on ss_sold_date_sk = d_date_sk where ss_list_price is not null) v where rnk = 100 order by d_date, i_item_id limit 50 -- To view, visit http://gerrit.cloudera.org:8080/16942 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I801d7799b0d649c73d2dd1703729a9b58a662509 Gerrit-Change-Number: 16942 Gerrit-PatchSet: 8 Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Wed, 13 Jan 2021 22:51:10 +0000 Gerrit-HasComments: Yes