[
https://issues.apache.org/jira/browse/ARROW-8348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17076462#comment-17076462
]
Felix Benning commented on ARROW-8348:
--------------------------------------
Usage of a Zero Sentinel:
Since null checking is not without cost, it might be helpful to some
algorithms, if the content "underneath" the nulls is zero. For example in
means, or scalar products and thus matrix multiplication, knowing that the
array has zeros where the na's are, would allow these algorithms to pretend
that there are no na's. Since setting all nulls to zero in a matrix of n
columns and n rows costs O(n^2), it would make sense to set them all to zero
before matrix multiplication i.e. O(n^3) and similarly expensive algorithms. If
there was a `na_are_zero` flag, other algorithms could later utilize this work
already being done. Algorithms which change the data and violate this contract,
would only need to reset the flag. And in some use cases, it might be possible
to use idle time of the computer to "clean up" the na's, preparing for the next
query.
> [C++] Support optional sentinel values in primitive Array for nulls
> -------------------------------------------------------------------
>
> Key: ARROW-8348
> URL: https://issues.apache.org/jira/browse/ARROW-8348
> Project: Apache Arrow
> Issue Type: Improvement
> Reporter: Francois Saint-Jacques
> Priority: Major
>
> This is an optional feature where a sentinel value is stored in null cells
> and is exposed via an accessor method, e.g. `optional<T>
> Array<T>::HasSentinel() const;`. This would allow zero-copy bi-directional
> conversion with R.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)