You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Liya Fan (JIRA)" <ji...@apache.org> on 2019/07/18 02:22:00 UTC

[jira] [Created] (ARROW-5973) [Java] Variable width vectors' get methods should return return null when the underlying data is null

Liya Fan created ARROW-5973:
-------------------------------

             Summary: [Java] Variable width vectors' get methods should return return null when the underlying data is null
                 Key: ARROW-5973
                 URL: https://issues.apache.org/jira/browse/ARROW-5973
             Project: Apache Arrow
          Issue Type: Bug
          Components: Java
            Reporter: Liya Fan
            Assignee: Liya Fan


For variable-width vectors (VarCharVector and VarBinaryVector), when the validity bit is not set, it means the underlying data is null, so the get method should return null.

However, the current implementation throws an IllegalStateException when NULL_CHECKING_ENABLED is set, or returns an empty array when the flag is clear.

Maybe the purpose of this design is to be consistent with fixed-width vectors. However, the scenario is different: fixed-width vectors (e.g. IntVector) throw an IllegalStateException, simply because the primitive types are non-nullable.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)