You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sushanth Sowmyan (JIRA)" <ji...@apache.org> on 2015/10/03 00:18:27 UTC
[jira] [Commented] (HIVE-12012) select query on json table with map
containing numeric values fails
[ https://issues.apache.org/jira/browse/HIVE-12012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941874#comment-14941874 ]
Sushanth Sowmyan commented on HIVE-12012:
-----------------------------------------
Thanks for the report, Jason. Sure, I can look further into this. I had looked at HCATALOG-630 a long time back but I seem to remember that I could not reproduce that at the time. If we have a more recent reproduction, it definitely is worth investigating.
Tests for JsonSerDe are mostly in TestJsonSerDe, instead of in .q files, since it descends from HCatalog - that seems to test map<short,string> and map<string,struct<i:int>> as the basic cases, which work.
I'll try to reproduce and dig further.
> select query on json table with map containing numeric values fails
> -------------------------------------------------------------------
>
> Key: HIVE-12012
> URL: https://issues.apache.org/jira/browse/HIVE-12012
> Project: Hive
> Issue Type: Bug
> Components: Serializers/Deserializers
> Reporter: Jagruti Varia
> Assignee: Jason Dere
> Attachments: HIVE-12012.1.patch
>
>
> select query on json table throws this error if table contains map type column:
> {noformat}
> Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Current token (FIELD_NAME) not numeric, can not use numeric value accessors
> at [Source: java.io.ByteArrayInputStream@295f79b; line: 1, column: 26]
> {noformat}
> steps to reproduce the issue:
> {noformat}
> hive> create table c_complex(a array<string>,b map<string,int>) row format serde 'org.apache.hive.hcatalog.data.JsonSerDe';
> OK
> Time taken: 0.319 seconds
> hive> insert into table c_complex select array('aaa'),map('aaa',1) from studenttab10k limit 2;
> Query ID = hrt_qa_20150826183232_47deb33a-19c0-4d2b-a92f-726659eb9413
> Total jobs = 1
> Launching Job 1 out of 1
> Status: Running (Executing on YARN cluster with App id application_1440603993714_0010)
> --------------------------------------------------------------------------------
> VERTICES STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
> --------------------------------------------------------------------------------
> Map 1 .......... SUCCEEDED 1 1 0 0 0 0
> Reducer 2 ...... SUCCEEDED 1 1 0 0 0 0
> --------------------------------------------------------------------------------
> VERTICES: 02/02 [==========================>>] 100% ELAPSED TIME: 11.75 s
> --------------------------------------------------------------------------------
> Loading data to table default.c_complex
> Table default.c_complex stats: [numFiles=1, numRows=2, totalSize=56, rawDataSize=0]
> OK
> Time taken: 13.706 seconds
> hive> select * from c_complex;
> OK
> Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Current token (FIELD_NAME) not numeric, can not use numeric value accessors
> at [Source: java.io.ByteArrayInputStream@295f79b; line: 1, column: 26]
> Time taken: 0.115 seconds
> hive> select count(*) from c_complex;
> OK
> 2
> Time taken: 0.205 seconds, Fetched: 1 row(s)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)