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

Hive allows to create a struct with duplicate attribute names

    XMLWordPrintableJSON

Details

    Description

      When you create at table with a struct with twice the same attribute name, hive allow you to create it.
      create table test_struct( duplicateColumn struct<id:int, id:int>);
      You can insert data into it :
      insert into test_struct select named_struct("id",1,"id",1);

      But you can not read it :
      select * from test_struct;
      Return : java.io.IOException: java.io.IOException: Error reading file: hdfs://.../test_struct/delta_0000001_0000001_0000/bucket_00000 ,

      We can create and insert. but fail on read the Struct part of the tables. We can still read all other columns (if we have more than one) but not the struct anymore.

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              dkuzmenko Denys Kuzmenko
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m