Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18137

Schema evolution: newly inserted column value in pre-existing partition is masked to null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None

    Description

      set hive.explain.user=false;
      set hive.fetch.task.conversion=none;
      set hive.mapred.mode=nonstrict;
      set hive.cli.print.header=true;
      SET hive.exec.schema.evolution=true;
      SET hive.vectorized.use.vectorized.input.format=true;
      SET hive.vectorized.use.vector.serde.deserialize=false;
      SET hive.vectorized.use.row.serde.deserialize=false;
      SET hive.vectorized.execution.enabled=false;
      set hive.exec.dynamic.partition.mode=nonstrict;
      set hive.metastore.disallow.incompatible.col.type.changes=true;
      set hive.default.fileformat=textfile;
      set hive.llap.io.enabled=false;
      
      CREATE TABLE part_add_int_permute_select(insert_num int, a INT, b STRING) PARTITIONED BY(part INT);
      
      insert into table part_add_int_permute_select partition(part=1) VALUES (1, 1111, 'new');
      
      alter table part_add_int_permute_select add columns(c int);
      
      insert into table part_add_int_permute_select partition(part=1) VALUES (2, 2222, 'new', 3333);
      
      select insert_num,part,a,b,c from part_add_int_permute_select;
      

      results for the last select:

      1      1       1111    new     NULL
      2      1       2222    new     NULL
      

      I think the following result should be expected:

      1      1       1111    new     NULL
      2      1       2222    new     3333
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kgyrtkirk Zoltan Haindrich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: