You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashish Kumar Singh (JIRA)" <ji...@apache.org> on 2014/08/09 02:04:12 UTC

[jira] [Commented] (HIVE-7657) Nullable union of 3 or more types is not recognized nullable

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

Ashish Kumar Singh commented on HIVE-7657:
------------------------------------------

[~argasi] could you provide an example, like actual query? It will be helpful.

> Nullable union of 3 or more types is not recognized nullable
> ------------------------------------------------------------
>
>                 Key: HIVE-7657
>                 URL: https://issues.apache.org/jira/browse/HIVE-7657
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>            Reporter: Arkadiusz Gasior
>            Assignee: Ashish Kumar Singh
>              Labels: avro
>
> Handling nullable union of 3 types or more is causing serialization issues, as ["null","long","string"] is not recognized nullable. Potential code causing issues might be AvroSerdeUtils.java: 
> {code}
>   public static boolean isNullableType(Schema schema) {
>     return schema.getType().equals(Schema.Type.UNION) &&
>            schema.getTypes().size() == 2 &&
>              (schema.getTypes().get(0).getType().equals(Schema.Type.NULL) ||
>               schema.getTypes().get(1).getType().equals(Schema.Type.NULL));
>       // [null, null] not allowed, so this check is ok.
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)