You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Sergio Peña (JIRA)" <ji...@apache.org> on 2014/10/23 23:31:34 UTC
[jira] [Assigned] (HIVE-8577) Cannot deserialize Avro schema with a
map with null values
[ https://issues.apache.org/jira/browse/HIVE-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergio Peña reassigned HIVE-8577:
---------------------------------
Assignee: Sergio Peña
> 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
> Attachments: 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)