[
https://issues.apache.org/jira/browse/HIVE-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14190730#comment-14190730
]
Gunther Hagleitner commented on HIVE-8577:
------------------------------------------
+1 for 0.14.
> Cannot deserialize Avro schema with a map<string,string> with null values
> -------------------------------------------------------------------------
>
> Key: HIVE-8577
> URL: https://issues.apache.org/jira/browse/HIVE-8577
> Project: Hive
> Issue Type: Bug
> Affects Versions: 0.15.0
> Reporter: Sergio Peña
> Assignee: Sergio Peña
> Labels: regression
> Fix For: 0.15.0
>
> Attachments: HIVE-8577.1.patch, HIVE-8577.1.patch, HIVE-8577.2.patch,
> map_null_schema.avro, map_null_val.avro
>
>
> An avro table with a map<string,string> column that contains null values
> cannot be deserialized when running the select statement.
> Create the following table:
> {noformat}
> CREATE TABLE avro_table (avreau_col_1 map<string,string>)
> ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' STORED AS
> INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
> OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
> TBLPROPERTIES ('avro.schema.url'='file:///tmp/map_null_schema.avro');
> {noformat}
> Then load the avro data:
> {noformat}
> LOAD DATA LOCAL INPATH '/tmp/map_null_val.avro' OVERWRITE INTO TABLE
> avro_table;
> {noformat}
> And do the select (it fails):
> {noformat}
> SELECT * FROM avro_table;
> Error: java.io.IOException: org.apache.avro.AvroRuntimeException: Not a map:
> "null" (state=,code=0)
> {noformat}
> This is a regression bug (it works correctly on hive 0.13.1 version).
> This is the output that hive 0.13.1 displays:
> {noformat}
> {"key3":"val3","key4":null}
> {"key3":"val3","key4":null}
> {"key1":null,"key2":"val2"}
> {"key3":"val3","key4":null}
> {"key3":"val3","key4":null}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)