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

Column length not sufficient for large STRUCT definitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.5.0
    • 0.6.0
    • Metastore
    • None

    Description

      Can be reproduced by adding the following table:

      hive> CREATE TABLE test (big struct<prop1: int,
                                          prop2: int,
                                          prop3: int,
                                          prop4: int,
                                          prop5: int,
                                          prop6: int,
                                          prop7: int,
                                          prop8: int,
                                          prop9: int,
                                          prop10: int,
                                          prop10: int,
                                          prop11: int,
                                          prop12: int,
                                          prop13: int,
                                          prop14: int,
                                          prop15: int,
                                          prop16: int,
                                          prop17: int,
                                          prop18: int,
                                          prop19: int>);

      Error:

      FAILED: Error in metadata: javax.jdo.JDODataStoreException: Add request failed : INSERT INTO COLUMNS (SD_ID,COMMENT,"COLUMN_NAME",TYPE_NAME,INTEGER_IDX) VALUES (?,?,?,?,?) 
      NestedThrowables:
      java.sql.SQLDataException: A truncation error was encountered trying to shrink VARCHAR 'struct<prop1:int,prop2:int,prop3:int,prop4:int,prop5:int,pro&' to length 128.
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

      Workaround:
      Change column length in metastore. Derby example: ALTER TABLE columns ALTER type_name SET DATA TYPE VARCHAR(1000);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wnagele Wolfgang Nagele
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: