hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-5865) AvroDeserializer incorrectly assumes keys to Maps will always be of type 'org.apache.avro.util.Utf8'
Date Thu, 02 Oct 2014 08:59:33 GMT

    [ https://issues.apache.org/jira/browse/HIVE-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156243#comment-14156243
] 

Hive QA commented on HIVE-5865:
-------------------------------



{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12672440/HIVE-5865.patch

{color:red}ERROR:{color} -1 due to 14 failed/errored test(s), 6503 tests executed
*Failed tests:*
{noformat}
org.apache.hive.hcatalog.pig.TestHCatLoader.testColumnarStorePushdown[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testConvertBooleanToInt[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testGetInputBytes[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testProjectionsBasic[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testReadDataBasic[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testReadDataPrimitiveTypes[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testReadPartitionedBasic[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testSchemaLoadBasic[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testSchemaLoadComplex[5]
org.apache.hive.hcatalog.pig.TestHCatLoader.testSchemaLoadPrimitiveTypes[5]
org.apache.hive.hcatalog.pig.TestHCatStorer.testDynamicPartitioningMultiPartColsNoDataInDataNoSpec[5]
org.apache.hive.hcatalog.pig.TestHCatStorer.testEmptyStore[5]
org.apache.hive.hcatalog.pig.TestHCatStorer.testNoAlias[5]
org.apache.hive.hcatalog.pig.TestHCatStorer.testPartitionPublish[5]
{noformat}

Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/1083/testReport
Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/1083/console
Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-1083/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 14 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12672440

> AvroDeserializer incorrectly assumes keys to Maps will always be of type 'org.apache.avro.util.Utf8'
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-5865
>                 URL: https://issues.apache.org/jira/browse/HIVE-5865
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.11.0, 0.12.0, 0.13.0
>            Reporter: Ben Roling
>         Attachments: HIVE-5865.patch
>
>
> AvroDeserializer. deserializeMap() incorrectly assumes the type of they keys will always
be 'org.apache.avro.util.Utf8'.  If the reader schema defines "avro.java.string"="String",
this assumption does not hold, resulting in a ClassCastException.
> I think a simple fix would be to define 'mapDatum' with type Map<CharSequence,Object>
instead of Map<Utf8,Object>.  Assuming the key has the more general type of 'CharSequence'
avoids the need to make an assumption of either String or Utf8.
> I discovered the issue when using Hive 0.11.0.  Looking at the tags it is also there
is in 0.12.0 and trunk:
> https://github.com/apache/hive/blob/99f5bfcdf64330d062a30c0c9d83be1fbee54c34/serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroDeserializer.java#L313
> The reason I saw this issue was because I pointed my Hive table to a schema file I populated
based on pulling the schema from the SCHEMA$ attribute of an Avro generated Java class and
I used stringType=String in the configuration of the avro-maven-plugin when generating my
Java classes.
> If I alter the schema my Hive table points to such that it doesn't have the "avro.java.string"
attribute on my "map" type objects then queries work fine but if I leave those in there I
get the ClassCastException anytime I try to query the table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message