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

Ethan Levine commented on ARROW-1710:
-------------------------------------

The BitVector is an extra object that has to be allocated (both in terms of the 
backing data and in terms of the Java objects involved). You'd also need to 
perform bit masking of the underlying data with every write, which could 
involve a cache miss if the data for the BitVector isn't neatly colocated with 
the actual data for the nullable vector.

Perhaps a tracking flag could be added to the nullable vectors, though. It 
would start out "false", and get set to "true" if you ever write a null value. 
That way you could avoid the extra allocation and computation involved with 
tracking the validity of each value in the case where there are no null values. 
This seems like it would be more complicated than just keeping non-nullable 
vectors around, however.

> [Java] Decide what to do with non-nullable vectors in new vector class 
> hierarchy 
> ---------------------------------------------------------------------------------
>
>                 Key: ARROW-1710
>                 URL: https://issues.apache.org/jira/browse/ARROW-1710
>             Project: Apache Arrow
>          Issue Type: Sub-task
>          Components: Java - Vectors
>            Reporter: Li Jin
>             Fix For: 0.8.0
>
>
> So far the consensus seems to be remove all non-nullable vectors. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to