hive-issues 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-14205) Hive doesn't support union type with AVRO file format
Date Thu, 21 Jul 2016 02:56:20 GMT

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

Hive QA commented on HIVE-14205:
--------------------------------



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

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/586/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/586/console
Test logs: http://ec2-204-236-174-241.us-west-1.compute.amazonaws.com/logs/PreCommit-HIVE-MASTER-Build-586/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and
output '+ [[ -n /usr/java/jdk1.8.0_25 ]]
+ export JAVA_HOME=/usr/java/jdk1.8.0_25
+ JAVA_HOME=/usr/java/jdk1.8.0_25
+ export PATH=/usr/java/jdk1.8.0_25/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ PATH=/usr/java/jdk1.8.0_25/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'M2_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
+ M2_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128'
+ cd /data/hive-ptest/working/
+ tee /data/hive-ptest/logs/PreCommit-HIVE-MASTER-Build-586/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 3390f5d HIVE-14279 : fix mvn test TestHiveMetaStore.testTransactionalValidation
 (Zoltan Haindrich via Ashutosh Chauhan)
+ git clean -f -d
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git reset --hard origin/master
HEAD is now at 3390f5d HIVE-14279 : fix mvn test TestHiveMetaStore.testTransactionalValidation
 (Zoltan Haindrich via Ashutosh Chauhan)
+ git merge --ff-only origin/master
Already up-to-date.
+ git gc
+ patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hive-ptest/working/scratch/build.patch
+ [[ -f /data/hive-ptest/working/scratch/build.patch ]]
+ chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh
+ /data/hive-ptest/working/scratch/smart-apply-patch.sh /data/hive-ptest/working/scratch/build.patch
The patch does not appear to apply with p0, p1, or p2
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12819020 - PreCommit-HIVE-MASTER-Build

> Hive doesn't support union type with AVRO file format
> -----------------------------------------------------
>
>                 Key: HIVE-14205
>                 URL: https://issues.apache.org/jira/browse/HIVE-14205
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>            Reporter: Yibing Shi
>            Assignee: Yibing Shi
>         Attachments: HIVE-14205.1.patch, HIVE-14205.2.patch, HIVE-14205.3.patch, HIVE-14205.4.patch,
HIVE-14205.5.patch
>
>
> Reproduce steps:
> {noformat}
> hive> CREATE TABLE avro_union_test
>     > PARTITIONED BY (p int)
>     > ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
>     > STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
>     > OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
>     > TBLPROPERTIES ('avro.schema.literal'='{
>     >    "type":"record",
>     >    "name":"nullUnionTest",
>     >    "fields":[
>     >       {
>     >          "name":"value",
>     >          "type":[
>     >             "null",
>     >             "int",
>     >             "long"
>     >          ],
>     >          "default":null
>     >       }
>     >    ]
>     > }');
> OK
> Time taken: 0.105 seconds
> hive> alter table avro_union_test add partition (p=1);
> OK
> Time taken: 0.093 seconds
> hive> select * from avro_union_test;
> FAILED: RuntimeException org.apache.hadoop.hive.ql.metadata.HiveException: Failed with
exception Hive internal error inside isAssignableFromSettablePrimitiveOI void not supported
yet.java.lang.RuntimeException: Hive internal error inside isAssignableFromSettablePrimitiveOI
void not supported yet.
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.isInstanceOfSettablePrimitiveOI(ObjectInspectorUtils.java:1140)
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.isInstanceOfSettableOI(ObjectInspectorUtils.java:1149)
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.hasAllFieldsSettable(ObjectInspectorUtils.java:1187)
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.hasAllFieldsSettable(ObjectInspectorUtils.java:1220)
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.hasAllFieldsSettable(ObjectInspectorUtils.java:1200)
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.getConvertedOI(ObjectInspectorConverters.java:219)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.setupOutputObjectInspector(FetchOperator.java:581)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.initialize(FetchOperator.java:172)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.<init>(FetchOperator.java:140)
> 	at org.apache.hadoop.hive.ql.exec.FetchTask.initialize(FetchTask.java:79)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:482)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:311)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1194)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1289)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1120)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1108)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:218)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:170)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:381)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:773)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:691)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:626)
> 	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:497)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {noformat}
> Another test case to show this problem is:
> {noformat}
> hive> create table avro_union_test2 (value uniontype<int,bigint>) stored as
avro;
> OK
> Time taken: 0.053 seconds
> hive> show create table avro_union_test2;
> OK
> CREATE TABLE `avro_union_test2`(
>   `value` uniontype<void,int,bigint> COMMENT '')
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
> LOCATION
>   'hdfs://localhost/user/hive/warehouse/avro_union_test2'
> TBLPROPERTIES (
>   'transient_lastDdlTime'='1468173589')
> Time taken: 0.051 seconds, Fetched: 12 row(s)
> {noformat}
> Although column {{value}} is defined as {{uniontype<int,bigint>}} in create table
command, its type becomes {{uniontype<void,int,bigint>}} after table is defined. Hive
accidentally make the nullable definition in avro schema ({{\["null", "int", "long"\]}}) 
into union definition.



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

Mime
View raw message