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

Hive complex types column query result error when "create table as select"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • SQL
    • None

    Description

      When "create table as select" * query contains *map<string, array<int>> type column, the column in new table is null.
       
      This is a demo to reproduce the bug:

      hive> CREATE TABLE struct_table(info map<string, array<int>>);
      hive> insert into struct_table values (map('test', array(1,2)));
      hive> select * from struct_table;
      OK
      {"test":[1,2]}
      Time taken: 0.245 seconds, Fetched: 1 row(s)
      
      
      hive> create table struct_table_bak as select * from struct_table;
      hive> select * from struct_table_bak;
      OK
      {"test":null}
      Time taken: 0.102 seconds, Fetched: 1 row(s)
      

       
       
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            changzc_330 Chang Zhichao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: