You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jörn Horstmann (Jira)" <ji...@apache.org> on 2020/09/24 08:51:00 UTC

[jira] [Created] (ARROW-10078) [Rust]: From implementations should validate data type

Jörn Horstmann created ARROW-10078:
--------------------------------------

             Summary: [Rust]: From<ArrayDataRef> implementations should validate data type
                 Key: ARROW-10078
                 URL: https://issues.apache.org/jira/browse/ARROW-10078
             Project: Apache Arrow
          Issue Type: Improvement
          Components: Rust
    Affects Versions: 1.0.1
            Reporter: Jörn Horstmann


See [https://github.com/apache/arrow/blob/ac86123a3f013ba1eeac2b66c2ccd00810c67871/rust/arrow/src/array/array.rs#L870]

The implementation currently does not validate that the datatype of the ArrayData argument matches. This can lead to inconsistencies, for example it is possible to create a TimestampMillisecondArray whose datatype reports Float64.

A similar onconsistentcy could arise when trying to convert between types like
{code:java}
let keys: Int32Array = dict_array.data().into() {code}
Here {{keys.data_type()}} would still return {{Dictionary}}



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