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!