Anurag Shekhar created HIVE-25434: ------------------------------------- Summary: While inserting into a complex type column string and char() type treated incompatible Key: HIVE-25434 URL: https://issues.apache.org/jira/browse/HIVE-25434 Project: Hive Issue Type: Bug Components: HiveServer2 Reporter: Anurag Shekhar
Steps to reproduce Create a table with map or array type with char as one of the fields. {code:java} CREATE TABLE t1(array_type array <char(10)>); {code} Try to insert {code:java} INSERT INTO table t1 SELECT array(cast ('a' as char(10)));{code} Insertion fails with following error {code:java} Error: Error while compiling statement: FAILED: SemanticException [Error 10044]: Line 1:18 Cannot insert into target table because column number/types are different 't1': Cannot convert column 0 from array<string> to array<char(10)>. (state=42000,code=10044) {code} The same works if the element was of type string -- This message was sent by Atlassian Jira (v8.3.4#803005)