mirror of
https://github.com/apache/impala.git
synced 2026-02-03 09:00:39 -05:00
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 <amsinha@cloudera.com> Tested-by: Aman Sinha <amsinha@cloudera.com>