You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jason Dere (JIRA)" <ji...@apache.org> on 2013/08/30 22:42:52 UTC

[jira] [Commented] (HIVE-5159) Change the kind fields in ORC's proto file to optional

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

Jason Dere commented on HIVE-5159:
----------------------------------

Just want to get a bit of clarification on this issue, since it goes against the "required is forever" guideline described in https://developers.google.com/protocol-buffers/docs/proto#simple.

If I understand correctly, the issue is when an older client receives newer Type value, containing a Kind enum that didn't exist at the time the older client was built. In this situation the Kind value is set as NULL.  Is the point of setting Kind as optional field of Type so that you would have the ability to call hasKind() on the Type and do appropriate error handling? Looking at OrcProto.java it appears that there is such a Type.hasKind() method already, so this use case is already covered. Or is there another use case that you are thinking of here?
                
> Change the kind fields in ORC's proto file to optional
> ------------------------------------------------------
>
>                 Key: HIVE-5159
>                 URL: https://issues.apache.org/jira/browse/HIVE-5159
>             Project: Hive
>          Issue Type: Bug
>          Components: File Formats
>            Reporter: Owen O'Malley
>            Assignee: Jason Dere
>
> Java's protobuf generated code uses a null value to represent enum values that were added after the reader was compiled. To reflect that reality, the enum values should always be marked as optional.

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