mirror of
https://github.com/apache/impala.git
synced 2026-01-08 12:02:54 -05:00
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 Reviewed-on: http://gerrit.cloudera.org:8080/8791 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Impala Public Jenkins
This commit is contained in:
committed by
Impala Public Jenkins
parent
11497c2aa9
commit
2e83ba5796
@@ -945,3 +945,14 @@ RESET alltypesnopart_insert
|
||||
---- RESULTS
|
||||
: 100
|
||||
====
|
||||
---- QUERY
|
||||
# IMPALA-6280: clustered with outer join, inline view, and TupleisNullPredicate
|
||||
insert into table alltypesinsert (int_col)
|
||||
partition (year, month) /*+ clustered,shuffle */
|
||||
select v.id, t1.id, t1.month from
|
||||
(select coalesce(id, 10) id from functional.alltypessmall) v
|
||||
right outer join functional.alltypestiny t1 on t1.id = v.id
|
||||
where v.id = 0
|
||||
---- RESULTS
|
||||
year=0/month=1/: 1
|
||||
====
|
||||
Reference in New Issue
Block a user