Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-252

Empty string partition value causes metastore update failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 0.6
    • Impala 1.0
    • 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.

      Attachments

        Activity

          People

            alex.behm Alexander Behm
            henryr Henry Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: