Aman Sinha has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18072 )
Change subject: IMPALA-11030: Fix incorrect creation of common partition exprs ...................................................................... IMPALA-11030: Fix incorrect creation of common partition exprs When there are 2 or more analytic functions in an inline view and at least one of them does not have a partition-by expr, we were previously still populating the commonPartitionExprs list in AnalyticInfo. This common partition expr was then used during the auxiliary predicate creation when the outer query has a predicate on partition-by column. This leads to wrong result because the auxiliary predicate is pushed down to the table scan. While pushing down predicate on a partitioning column is okay if all the analytic functions contain that partitioning column, it is not correct to do this when at least one analytic function does not have that partitioning column. This patch fixes the wrong result by ensuring that the AnalyticInfo's commonPartitionExprs is empty if at least one analytic function does not have partitioning exprs. Testing: - Added new planner test and e2e test for row_num analytic function Change-Id: Iebb51f691e8e5459ffbaf5a49907140f2de212cc Reviewed-on: http://gerrit.cloudera.org:8080/18072 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Aman Sinha <[email protected]> --- M fe/src/main/java/org/apache/impala/analysis/AnalyticInfo.java M testdata/workloads/functional-planner/queries/PlannerTest/analytic-fns.test M testdata/workloads/functional-query/queries/QueryTest/analytic-fns.test 3 files changed, 68 insertions(+), 1 deletion(-) Approvals: Impala Public Jenkins: Looks good to me, approved Aman Sinha: Verified -- To view, visit http://gerrit.cloudera.org:8080/18072 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iebb51f691e8e5459ffbaf5a49907140f2de212cc Gerrit-Change-Number: 18072 Gerrit-PatchSet: 4 Gerrit-Owner: Aman Sinha <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]>
