You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Neville Dipale (Jira)" <ji...@apache.org> on 2020/11/07 13:14:00 UTC

[jira] [Resolved] (ARROW-10448) [Rust] PrimitiveArray::new can create arrays not in spec

     [ https://issues.apache.org/jira/browse/ARROW-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neville Dipale resolved ARROW-10448.
------------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 8560
[https://github.com/apache/arrow/pull/8560]

> [Rust] PrimitiveArray::new can create arrays not in spec
> --------------------------------------------------------
>
>                 Key: ARROW-10448
>                 URL: https://issues.apache.org/jira/browse/ARROW-10448
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Rust
>    Affects Versions: 3.0.0
>            Reporter: Jorge Leitão
>            Assignee: Jorge Leitão
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently, PrimitiveArray::new passed with `null_count != 0` creates an array that does not follow the specification, as it is initialized with a {{None}} null bitmap but a non-zero null_count.
> This method also makes no attempt to check for the buffer's aligment, which leads to UB.
> Since a change in this method's signature requires a backward incompatible change, and it is only used in tests, I propose that we just remove it: we have good offers to create primitive arrays:
>  * from an {{ArrayData}},
>  * from a vector or vector of optionals
>  * from an iterator
> which covers all major cases.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)