[ https://issues.apache.org/jira/browse/HIVE-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13880067#comment-13880067 ]
chewie commented on HIVE-2390: ------------------------------ I wanted to see about the current status, and if there are any ETAs for resolution? I can assure there are quite a few efforts needing to qualify on data within uniontypes in Hive (Impala, etc), as soon as possible. I've been informed my effort will not accept uniontype usage (with more than one non-null type) unless there is built-in Hive support (which is very unfortunate, but not without point)... meaning the types have to be split into separate fields, which obviously is less semantically correct, more clunky (in the Avro model and Java), and provides no benefit other than a workaround for clean query ability. Something else that needs addressed is how to reference nested fields / structs / etc in the query. Currently '.' (period) is used, can this be kept for union? Ambiguity can arise if more than one type has the same field, in all other cases it can be implicitly unambiguous. This could actually be validated before query execution. When more than one type could have the same field, what would the syntax be? Possibly: {code} unionobject.object.[2]unionobject.unionobject.[1]unionobject.object..... {code} In the above example, any ambiguous object types being reference can be qualified by the int value of the type in square brackets []. > Expand support for union types > ------------------------------ > > Key: HIVE-2390 > URL: https://issues.apache.org/jira/browse/HIVE-2390 > Project: Hive > Issue Type: Bug > Reporter: Jakob Homan > Assignee: Mohammad Kamrul Islam > Labels: uniontype > > When the union type was introduced, full support for it wasn't provided. For > instance, when working with a union that gets passed to LazyBinarySerde: > {noformat}Caused by: java.lang.RuntimeException: Unrecognized type: UNION > at > org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe.serialize(LazyBinarySerDe.java:468) > at > org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe.serializeStruct(LazyBinarySerDe.java:230) > at > org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe.serialize(LazyBinarySerDe.java:184) > {noformat} -- This message was sent by Atlassian JIRA (v6.1.5#6160)