Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 0.6
-
None
-
None
Description
[localhost:21000] > create table s_part(col int) partitioned by (s string); Query: create table s_part(col int) partitioned by (s string) [localhost:21000] > insert into s_part partition(s) select 1, "" from functional.alltypes limit 1; Query: insert into s_part partition(s) select 1, "" from functional.alltypes limit 1 Remote error [localhost:21000] > insert into s_part partition(s="") select 1 from functional.alltypes limit 1; Query: insert into s_part partition(s="") select 1 from functional.alltypes limit 1 Remote error
Hive's behaviour is arguably worse; empty string in partition columns get silently mapped to _HIVE_DEFAULT_PARTITION_ - and then that stays the value when that partition is selected!
We should map empty strings to our own _IMPALA_EMPTY_STRING_ constant, and then do the right thing when selecting them back. Same as for NULL values.