IMPALA-617: Cast NULLs in INSERT statement due to incomplete permutation list to expected column type.

Inserting NULLs with NULL_TYPE into Parquet tables cases a crash.

Change-Id: I350c7ee2789c017cee5c4b6a1292c9fae36087f1
Reviewed-on: http://gerrit.ent.cloudera.com:8080/696
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: jenkins
This commit is contained in:
Alex Behm
2013-10-13 22:08:00 -07:00
committed by Henry Robinson
parent 42a9d6c92e
commit b82880738c
2 changed files with 19 additions and 4 deletions

View File

@@ -10,6 +10,8 @@ use insert_permutation_test
---- QUERY
create table perm_nopart(int_col1 int, string_col string, int_col2 int);
create table perm_part(int_col1 int, string_col string) partitioned by (p1 int, p2 string);
create table parquet_part(int_col1 int, string_col string)
partitioned by (p1 int, p2 string) stored as parquetfile;
---- RESULTS
====
---- QUERY
@@ -178,3 +180,17 @@ NULL,'NULL',NULL
---- TYPES
INT,STRING,INT
====
---- QUERY
# Test inserting NULLs due to an incomplete column mapping into a Parquet table.
# Regression test against IMPALA-671.
insert into parquet_part() partition(p1, p2='foo') values(2)
---- RESULTS
p1=2/p2=foo/: 1
====
---- QUERY
select * from parquet_part
---- RESULTS
NULL,'NULL',2,'foo'
---- TYPES
INT,STRING,INT,STRING
====