Internal Jenkins has submitted this change and it was merged.

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/semi join
- collection table ref's parent tuple is not outer joined

Change-Id: Ie975ce139a103285c4e9f93c59ce1f1d2aa71767
Reviewed-on: http://gerrit.cloudera.org:8080/2399
Reviewed-by: Alex Behm <[email protected]>
Reviewed-by: Silvius Rus <[email protected]>
Tested-by: Internal Jenkins
---
M fe/src/main/java/com/cloudera/impala/analysis/AnalysisContext.java
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
6 files changed, 197 insertions(+), 88 deletions(-)

Approvals:
  Internal Jenkins: Verified
  Silvius Rus: Looks good to me, approved
  Alex Behm: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie975ce139a103285c4e9f93c59ce1f1d2aa71767
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.5.0_5.7.0
Gerrit-Owner: Alex Behm <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Silvius Rus <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>

Reply via email to