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

select * fails for table after adding new columns using rcfile storage format

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Labels:
      None

      Description

      Given the following tables:

      select * from two;
      +-----+----+
      | id  | a  |
      +-----+----+
      | 1   | a  |
      | 2   | b  |
      +-----+----+
      
       select * from three;
      +-----+----+----+
      | id  | a  | b  |
      +-----+----+----+
      | 1   | a  | z  |
      | 2   | b  | y  |
      | 3   | c  | x  |
      +-----+----+----+
      

      Execute the following steps:

      create table testrc (id bigint, a string) stored as rcfile;
      insert into table testrc select * from two;
      select * from testrc;  //returns correctly
      +-----+----+
      | id  | a  |
      +-----+----+
      | 1   | a  |
      | 2   | b  |
      +-----+----+
      
       alter table testrc add columns (b string);
       insert into table testrc select * from three;
      select * from testrc;  //new column returns null values
      +-----+----+----+
      | id  | a  | b  |
      +-----+----+----+
      | 1   | a  |    |
      | 2   | b  |    |
      | 1   | a  |    |
      | 2   | b  |    |
      | 3   | c  |    |
      +-----+----+----+
      

        Attachments

        1. HIVE-5788.patch
          5 kB
          Szehon Ho
        2. HIVE-5788.1.patch
          5 kB
          Szehon Ho

          Issue Links

            Activity

              People

              • Assignee:
                szehon Szehon Ho
                Reporter:
                szehon Szehon Ho
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: