[ https://issues.apache.org/jira/browse/HIVE-22130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16912142#comment-16912142 ]
Piotr Findeisen commented on HIVE-22130: ---------------------------------------- Similarly there are problems when doing CTAS or INS from TEXTFILE to SEQUENCEFILE or textual RCFILE. > Incorrect data inserted when CTAS or INS from TEXTFILE to ORC with nested > collection types > ------------------------------------------------------------------------------------------ > > Key: HIVE-22130 > URL: https://issues.apache.org/jira/browse/HIVE-22130 > Project: Hive > Issue Type: Bug > Components: Hive > Affects Versions: 3.1.0 > Reporter: Piotr Findeisen > Priority: Major > > {code} > CREATE TABLE ttf (t_complex MAP<INT, ARRAY<STRUCT<s_string: STRING, > s_double:DOUBLE>>>) STORED AS TEXTFILE; > CREATE TABLE tor (t_complex MAP<INT, ARRAY<STRUCT<s_string: STRING, > s_double:DOUBLE>>>) STORED AS ORC; > INSERT INTO ttf VALUES (map(1, array(named_struct('s_string', 'test abc', > 's_double', 1e-1), named_struct('s_string' , 'test xyz', 's_double', 2e-1)))); > INSERT INTO tor VALUES (map(1, array(named_struct('s_string', 'test abc', > 's_double', 1e-1), named_struct('s_string' , 'test xyz', 's_double', 2e-1)))); > SELECT * FROM ttf; > SELECT * FROM tor; > {code} > outputs > {code} > +----------------------------------------------------+ > | ttf.t_complex | > +----------------------------------------------------+ > | {1:[{"s_string":"test abc","s_double":0.1},{"s_string":"test > xyz","s_double":0.2}]} | > +----------------------------------------------------+ > +----------------------------------------------------+ > | tor.t_complex | > +----------------------------------------------------+ > | {1:[{"s_string":"test abc","s_double":0.1},{"s_string":"test > xyz","s_double":0.2}]} | > +----------------------------------------------------+ > {code} > But now when I do {{INSERT INTO .. SELECT}}: > {code} > INSERT INTO tor SELECT * FROM ttf; > SELECT * FROM tor; > {code} > the data gets inserted incorrectly. > {code} > +----------------------------------------------------+ > | tor.t_complex | > +----------------------------------------------------+ > | {1:[{"s_string":"test abc","s_double":0.1},{"s_string":"test > xyz","s_double":0.2}]} | > | {1:[{"s_string":"test abc\u00050.1","s_double":null}]} | > +----------------------------------------------------+ > {code} > Same happens when I {{CREATE TABLE .. STORED AS ORC AS SELECT ttf}}. -- This message was sent by Atlassian Jira (v8.3.2#803003)