You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2020/02/04 21:56:00 UTC
[jira] [Commented] (ARROW-7767) [C++] Add a facility to create a
Bitmap buffer from an data pointer with a specified sentinel
[ https://issues.apache.org/jira/browse/ARROW-7767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17030150#comment-17030150 ]
Wes McKinney commented on ARROW-7767:
-------------------------------------
Seems useful. Bonus points for vectorizing (pack 8 values into a byte at a time).
> [C++] Add a facility to create a Bitmap buffer from an data pointer with a specified sentinel
> ---------------------------------------------------------------------------------------------
>
> Key: ARROW-7767
> URL: https://issues.apache.org/jira/browse/ARROW-7767
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++, R
> Reporter: Francois Saint-Jacques
> Priority: Major
>
> This is a special case for R and other cases where the null value is represented by a sentinel. This would read the data pointer and return a null bitmap buffer where bits are activate for every row where the value is not the sentinel value. If no sentinel is encountered, return nullptr.
> {code:c++}
> template <typename ArrowType, typename CType = ArrowType::c_type>
> Result<std::shared_ptr<Buffer>> NullBitmapFromSentinelData(MemoryPool* pool, const CType* data, size_t n_values, CType sentinel_value>();
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)