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
- depends upon
-
HIVE-1364 Increase the maximum length of various metastore fields, and remove TYPE_NAME from COLUMNS primary key
- Closed