IMPALA-4527: Columns in Kudu tables created from Impala default to "NULL"

This commit reverts the behavior introduced by IMPALA-3719 which used
the Kudu default behavior for column nullability if none was specified
in the CREATE TABLE statement. With this commit, non-key columns of Kudu
tables that are created from Impala are by default nullable unless
specified otherwise.

Change-Id: I950d9a9c64e3851e11a641573617790b340ece94
Reviewed-on: http://gerrit.cloudera.org:8080/5259
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Internal Jenkins
This commit is contained in:
Dimitris Tsirogiannis
2016-11-29 10:02:35 -08:00
committed by Internal Jenkins
parent b374061206
commit da34ce9780
3 changed files with 27 additions and 20 deletions

View File

@@ -4,19 +4,19 @@ describe functional_kudu.alltypes
---- LABELS
NAME,TYPE,COMMENT,PRIMARY_KEY,NULLABLE,DEFAULT_VALUE,ENCODING,COMPRESSION,BLOCK_SIZE
---- RESULTS
'bigint_col','bigint','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'bool_col','boolean','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'date_string_col','string','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'double_col','double','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'float_col','float','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'bigint_col','bigint','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'bool_col','boolean','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'date_string_col','string','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'double_col','double','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'float_col','float','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'id','int','','true','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'int_col','int','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'month','int','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'smallint_col','smallint','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'string_col','string','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'timestamp_col','string','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'tinyint_col','tinyint','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'year','int','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'int_col','int','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'month','int','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'smallint_col','smallint','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'string_col','string','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'timestamp_col','string','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'tinyint_col','tinyint','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'year','int','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
---- TYPES
STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING
====
@@ -27,7 +27,7 @@ create table describe_test
pk2 int,
pk3 string,
c1 string null default 'abc' comment 'testing',
c2 int default 100 encoding plain_encoding compression snappy,
c2 int not null default 100 encoding plain_encoding compression snappy,
c3 int null block_size 8388608,
primary key (pk1, pk2, pk3))
distribute by hash (pk1) into 3 buckets

View File

@@ -23,9 +23,9 @@ compute stats simple;
describe simple;
---- RESULTS
'id','int','','true','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'name','string','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'valf','float','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'vali','bigint','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'name','string','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'valf','float','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
'vali','bigint','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
---- TYPES
STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING
====