Aman Sinha has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/17615 )

Change subject: IMPALA-10755: Fix migration of analytic predicate to inline 
view.
......................................................................

IMPALA-10755: Fix migration of analytic predicate to inline view.

As part of IMPALA-9979 we made changes to push down predicates
that reference analytic tuple into the inline view. In cases where
both sides of a predicate are slot references (for example,
a = MAX(b) where MAX(b) is an analytic function), it may not be
safe to push it into the inline view since the two sides may be
referencing separate tuples.

This patch fixes the behavior by skipping such predicates such
that they will be left unassigned and will subsequently get
assigned to a SELECT node above the analytic operator.

Testing:
 - Added planner tests for analytic predicates ensuring that
   analytic predicates are present in the SELECT node.
 - Added run time tests for the same using TPC-H and
   verified correctness.

Change-Id: Ib5cad3d408ee3695cafb35f66a4f19b4e8d0529e
Reviewed-on: http://gerrit.cloudera.org:8080/17615
Reviewed-by: Aman Sinha <amsi...@cloudera.com>
Tested-by: Aman Sinha <amsi...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/planner/SingleNodePlanner.java
M testdata/workloads/functional-planner/queries/PlannerTest/analytic-fns.test
A testdata/workloads/tpch/queries/analytic-fns.test
M tests/query_test/test_queries.py
4 files changed, 205 insertions(+), 5 deletions(-)

Approvals:
  Aman Sinha: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5cad3d408ee3695cafb35f66a4f19b4e8d0529e
Gerrit-Change-Number: 17615
Gerrit-PatchSet: 4
Gerrit-Owner: Aman Sinha <amsi...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>

Reply via email to