Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust]: From<ArrayDataRef> implementations should validate data type #103

Closed
alamb opened this issue Apr 26, 2021 · 1 comment
Closed

[Rust]: From<ArrayDataRef> implementations should validate data type #103

alamb opened this issue Apr 26, 2021 · 1 comment
Labels
arrow Changes to the arrow crate

Comments

@alamb
Copy link
Contributor

alamb commented Apr 26, 2021

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10078

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}}

@alamb alamb added the arrow Changes to the arrow crate label Apr 26, 2021
@jorgecarleitao
Copy link
Member

duplicates #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

No branches or pull requests

2 participants