Empty string partition value causes metastore update failure

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Blocker
    • Impala 1.0
    • Affects Version/s: Impala 0.6
    • Component/s: None
    • None

      [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.

            Assignee:
            Alexander Behm
            Reporter:
            Henry Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: