Thomas Tauber-Marshall has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/8791


Change subject: IMPALA-6280: Materialize TupleIsNullPredicate for insert sorts
......................................................................

IMPALA-6280: Materialize TupleIsNullPredicate for insert sorts

When a sort is inserted into a plan for an INSERT due to either the
target table being a Kudu table or the use of the 'clustered' hint,
and a TupleIsNullPredicate is present in the output of the sort, the
TupleIsNullPredicate may reference an incorrect tuple (i.e. not the
materialized sort tuple), leading to errors.

The solution is to materialize the TupleIsNullPredicate into the sort
tuple and then perform the appropriate expr substitutions, as is
already done for the case of analytic sorts.

Testing:
- Added an e2e test with a query that would previously fail.

Change-Id: I6c0ca717aa4321a5cc84edd1d5857912f8c85583
---
M fe/src/main/java/org/apache/impala/analysis/SortInfo.java
M fe/src/main/java/org/apache/impala/planner/AnalyticPlanner.java
M testdata/workloads/functional-query/queries/QueryTest/kudu_upsert.test
3 files changed, 46 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/91/8791/1
--
To view, visit http://gerrit.cloudera.org:8080/8791
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c0ca717aa4321a5cc84edd1d5857912f8c85583
Gerrit-Change-Number: 8791
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Tauber-Marshall <[email protected]>

Reply via email to