hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lefty Leverenz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-7892) Thrift Set type not working with Hive
Date Sat, 20 Sep 2014 07:05:33 GMT

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

Lefty Leverenz commented on HIVE-7892:
--------------------------------------

Should this be documented in the wiki?

We don't have a wikidoc for the Thrift SerDe (but probably should).  Here are some places
it is mentioned:

* [Developer Guide -- Hive SerDe | https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-HiveSerDe]
* [SerDe -- Built-in SerDes | https://cwiki.apache.org/confluence/display/Hive/SerDe#SerDe-Built-inSerDes]

Hive complex types are documented here:

* [Hive Data Types -- Complex Types | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-ComplexTypes]

> Thrift Set type not working with Hive
> -------------------------------------
>
>                 Key: HIVE-7892
>                 URL: https://issues.apache.org/jira/browse/HIVE-7892
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>            Reporter: Satish Mittal
>            Assignee: Satish Mittal
>             Fix For: 0.14.0
>
>         Attachments: HIVE-7892.1.patch, HIVE-7892.patch.txt
>
>
> Thrift supports List, Map and Struct complex types, which get mapped to Array, Map and
Struct complex types in Hive respectively. However thrift Set type doesn't seem to be working.

> Here is an example thrift struct:
> {noformat}
> namespace java sample.thrift
> struct setrow {
>     1: required set<i32> ids,
>     2: required string name,
> }
> {noformat}
> A Hive table is created with ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.thrift.ThriftDeserializer'
WITH SERDEPROPERTIES ('serialization.class'='sample.thrift.setrow', 'serialization.format'='org.apache.thrift.protocol.TBinaryProtocol').
> Describing the table shows:
> {noformat}
> hive> describe settable; 
> OK
> ids                 	struct<>            from deserializer   
> name                string              	from deserializer
> {noformat}
> Issuing a select query on set column throws SemanticException:
> {noformat}
> hive> select ids from settable;
> FAILED: SemanticException java.lang.IllegalArgumentException: Error: name expected at
the position 7 of 'struct<>' but '>' is found.
> {noformat}



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

Mime
View raw message