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

Wes McKinney commented on ARROW-33:
-----------------------------------

I started looking at this. I forgot about the null count -- with the current 
null count requirement, adding an offset member would require inspecting the 
bitmap on calling {{Array::Slice}} to determine the number of nulls in the 
sliced range. 

One possible workaround is to make {{Array::null_count}} virtual, and set the 
{{null_count_}} member to -1 when it is not known, so for sliced arrays it 
would need to be computed and cached the first time you call 
{{arr->null_count()}}. 

> C++: Implement zero-copy array slicing
> --------------------------------------
>
>                 Key: ARROW-33
>                 URL: https://issues.apache.org/jira/browse/ARROW-33
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Wes McKinney
>            Assignee: Wes McKinney
>
> Sliced array results will retain a reference to the parent's data buffer



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to