hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2941) Hive should expand nested structs when setting the table schema from thrift structs
Date Wed, 09 Jan 2013 10:30:43 GMT

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

Hudson commented on HIVE-2941:
------------------------------

Integrated in Hive-trunk-hadoop2 #54 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/54/])
    HIVE-2941: Hive should expand nested structs when setting the table schema from thrift
structs (Travis Crawford via Ashutosh Chauhan) (Revision 1347212)

     Result = ABORTED
hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347212
Files : 
* /hive/trunk/ql/src/test/results/clientpositive/case_sensitivity.q.out
* /hive/trunk/ql/src/test/results/clientpositive/input17.q.out
* /hive/trunk/ql/src/test/results/clientpositive/input5.q.out
* /hive/trunk/ql/src/test/results/clientpositive/input_testxpath.q.out
* /hive/trunk/ql/src/test/results/clientpositive/input_testxpath2.q.out
* /hive/trunk/ql/src/test/results/clientpositive/inputddl8.q.out
* /hive/trunk/ql/src/test/results/clientpositive/join_thrift.q.out
* /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ReflectionStructObjectInspector.java

                
> Hive should expand nested structs when setting the table schema from thrift structs
> -----------------------------------------------------------------------------------
>
>                 Key: HIVE-2941
>                 URL: https://issues.apache.org/jira/browse/HIVE-2941
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Travis Crawford
>            Assignee: Travis Crawford
>             Fix For: 0.10.0
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--HIVE-2941.D2721.1.patch, HIVE-2941.D3513.1.patch
>
>
> When setting a table serde, the deserializer is queried for its schema, which is used
to set the metastore table schema. The current implementation uses the class name stored in
the field as the field type.
> By storing the class name as the field type, users cannot see the contents of a struct
with "describe tblname". Applications that query HiveMetaStore for the table schema (specifically
HCatalog in this case) see an unknown field type, rather than a struct containing known field
types.
> Hive should store the expanded schema in the metastore so users browsing the schema see
expanded fields, and applications querying metastore see familiar types.
> DETAILS
> Set the table serde to something like this. This serde uses the built-in {{ThriftStructObjectInspector}}.
> {code}
> alter table foo_test
>   set serde "com.twitter.elephantbird.hive.serde.ThriftSerDe"
>   with serdeproperties ("serialization.class"="com.foo.Foo");
> {code}
> This causes a call to {{MetaStoreUtils.getFieldsFromDeserializer}} which returns a list
of fields and their schemas. However, currently it does not handle nested structs, and if
{{com.foo.Foo}} above contains a field {{com.foo.Bar}}, the class name {{com.foo.Bar}} would
appear as the field type. Instead, nested structs should be expanded.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message