hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brock Noland (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-8577) Cannot deserialize Avro schema with a map<string,string> with null values
Date Sun, 26 Oct 2014 00:41:33 GMT

    [ https://issues.apache.org/jira/browse/HIVE-8577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14184336#comment-14184336
] 

Brock Noland commented on HIVE-8577:
------------------------------------

Nice fix! Can we add your data file and a .q test as a regression test?

> 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: HIVE-8577.1.patch, HIVE-8577.1.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)

Mime
View raw message