You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Yulei Yang (Jira)" <ji...@apache.org> on 2019/10/28 07:37:00 UTC
[jira] [Reopened] (HIVE-16526) JsonSerDe does not support array as
map's value
[ https://issues.apache.org/jira/browse/HIVE-16526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yulei Yang reopened HIVE-16526:
-------------------------------
> JsonSerDe does not support array as map's value
> -----------------------------------------------
>
> Key: HIVE-16526
> URL: https://issues.apache.org/jira/browse/HIVE-16526
> Project: Hive
> Issue Type: Bug
> Components: HCatalog, Serializers/Deserializers
> Affects Versions: 1.2.1
> Reporter: Yulei Yang
> Priority: Minor
>
> To reproduce the issue do the following:
> CREATE TABLE test (
> store map<string,array<string>>
> )
> ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
> STORED AS TEXTFILE;
> load data local inpath '/path/to/s6.txt' overwrite into table test;
> select * from test;
> The data for s6.txt is below:
> {"store":{"fruit":["weight","8","type","apple"]}}
> {"store":{"fruit":["weight","9","type","orange"]}}
> Error log is:
> java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Array expected
> at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:507)
> at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:414)
> at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:140)
> at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1670)
> at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:233)
> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
> at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
> at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Array expected
> at org.apache.hive.hcatalog.data.JsonSerDe.deserialize(JsonSerDe.java:183)
> at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:488)
> ... 15 more
--
This message was sent by Atlassian Jira
(v8.3.4#803005)