[
https://issues.apache.org/jira/browse/HIVE-25644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441488#comment-17441488
]
Chang Zhichao commented on HIVE-25644:
--------------------------------------
if we create table manually, and insert by select query, the problem can be
reproduced.
{code:java}
hive> CREATE TABLE `struct_table_manual`(
`info` map<string,array<int>>)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';
hive> insert into struct_table_manual select * from struct_table;
hive> select * from struct_table_manual;
{"test":null}
{code}
> Hive complex types column query result error when "create table as select"
> --------------------------------------------------------------------------
>
> Key: HIVE-25644
> URL: https://issues.apache.org/jira/browse/HIVE-25644
> Project: Hive
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.1.2
> Reporter: Chang Zhichao
> Priority: Major
>
> 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:
> {code:java}
> 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)
> {code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)