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

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

Arkadiusz Gasior created HIVE-7657:
--------------------------------------

             Summary: 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


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)