hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristinn RĂșnarsson <krist...@activitystream.com>
Subject Error when querying map data type in Hive
Date Wed, 20 Jul 2016 11:31:39 GMT
Hello,

I have a table that is created after an Avro schema. This Avro-schema
contains two map type columns defined like this in the schema:

{"name": "dimensions", "type": ["null",{"type": "map", "values":
"string"}]},
{"name": "metrics", "type": ["null",{"type": "map", "values": "double"}]},

The table is created without any issues and I am able to load my data
(stored in parquet files) to the table. Querying any other column of the
table is fine, but when the map columns are included I get an exception:

"Failed with exception
java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException:
java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to
org.apache.hadoop.io.ArrayWritable"

The data in these columns is a map that can contain different number of
items in each row. The data looks like this:

"{"section":"Sitteplasser","delivery_type":"3","event_type":"Musikk"} "

Is this a known bug in the hive system or am I doing something that is
causing this?

Mime
View raw message