Alex Behm has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2399

Change subject: IMPALA-3065/IMPALA-3062: Restrict !empty() predicates to scan 
nodes.
......................................................................

IMPALA-3065/IMPALA-3062: Restrict !empty() predicates to scan nodes.

The bug:
Evaluating !empty() predicates at non-scan nodes interacts
poorly with our BE projection of collection slots. For example,
rows could incorrectly be filtered if a !empty() predicate is
assigned to a plan node that comes after the unnest of the
collection that also performs the projection.

The fix:
This patch reworks the generation of !empty() predicates
introduced in IMPALA-2663 for correctness purposes.
The predicates are generated in cases where we can ensure that
they will be assigned only by the parent scan, and no other
plan node.

The conditions are as follows:
- collection table ref is relative and non-correlated
- collection table ref represents the rhs of an inner/cross or
  non-anti semi join
- collection table ref's parent tuple is not outer joined

Change-Id: Ie975ce139a103285c4e9f93c59ce1f1d2aa71767
---
M fe/src/main/java/com/cloudera/impala/analysis/CollectionTableRef.java
M fe/src/main/java/com/cloudera/impala/analysis/SelectStmt.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/nested-collections.test
M testdata/workloads/functional-planner/queries/PlannerTest/tpch-nested.test
M 
testdata/workloads/functional-query/queries/QueryTest/nested-types-runtime.test
5 files changed, 181 insertions(+), 74 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/99/2399/2
-- 
To view, visit http://gerrit.cloudera.org:8080/2399
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie975ce139a103285c4e9f93c59ce1f1d2aa71767
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.5.0_5.7.0
Gerrit-Owner: Alex Behm <[email protected]>

Reply via email to