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

Field names are not preserved in ORC files written with ACID

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1.0, 2.2.0, 3.1.0, 4.0.0
    • 3.1.0, 4.0.0-alpha-1
    • None
    • None

    Description

      To repro:

      drop table if exists orc_nonacid;
      drop table if exists orc_acid;
      
      create table orc_nonacid (a int) clustered by (a) into 2 buckets stored as orc;
      create table orc_acid (a int) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES('transactional'='true');
      
      insert into table orc_nonacid values(1), (2);
      insert into table orc_acid values(1), (2);
      

      Running hive --service orcfiledump <file> on the files created by the insert statements above, you'll see that for orc_nonacid, the files have schema struct<a:int> whereas for orc_acid, the files have schema struct<operation:int,originalTransaction:bigint,bucket:int,rowId:bigint,currentTransaction:bigint,row:struct<_col0:int>>. The last field row should have schema struct<a:int>.

      Attachments

        1. HIVE-15190.1.patch
          12 kB
          Anthony Hsu
        2. HIVE-15190.2.patch
          12 kB
          Anthony Hsu
        3. HIVE-15190.3.patch
          14 kB
          Prasanth Jayachandran
        4. HIVE-15190.4.patch
          62 kB
          Prasanth Jayachandran
        5. HIVE-15190.5.patch
          62 kB
          Prasanth Jayachandran

        Issue Links

          Activity

            People

              erwaman Anthony Hsu
              erwaman Anthony Hsu
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: