hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Buntu Dev <buntu...@gmail.com>
Subject Cannot convert column 2 from string to map<string,string> error
Date Mon, 29 Feb 2016 23:36:38 GMT
When attempting to insert null value into a map<string,string> column type,
I run into this error:

Cannot convert column 2 from string to map<string,string>


Here is my Avro schema and the table definition:

~~~~~~~~~~~~~~~~
"fields": [
        {"name": "src", "type": ["null", "string"], "default": null},
        {"name": "uid", "type": ["null", "string"], "default": null},
        {"name": "attrs", "type": {"type": "map", "values": ["null",
"string"]}, "default": null},
...
]


> desc tmp_table;
+--------------------------+-----------------------+-----------------------+--+
|         col_name         |       data_type       |        comment        |
+--------------------------+-----------------------+-----------------------+--+
| src                | bigint                | from deserializer     |
| uid                  | int                   | from deserializer     |
| attrs                | map<string,string>    | from deserializer   |
....
...
~~~~~~~~~~~~~~~~

If I run this INSERT INTO, I get the error message mentioned:

 insert into tmp_table values ( 'src1', 'uid1', null);

Is there some way I can fix this issue?



Thanks!

Mime
View raw message