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

From<ArrayDataRef> implementations should validate data type #104

Closed
alamb opened this issue Apr 26, 2021 · 2 comments
Closed

From<ArrayDataRef> implementations should validate data type #104

alamb opened this issue Apr 26, 2021 · 2 comments
Labels
arrow Changes to the arrow crate security

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
@alamb
Copy link
Contributor Author

alamb commented Apr 26, 2021

Comment from Andrew Lamb(alamb) @ 2021-04-26T12:34:14.453+0000:

Migrated to github: https://github.com/apache/arrow-rs/issues/103

@jorgecarleitao jorgecarleitao changed the title [Rust]: From<ArrayDataRef> implementations should validate data type From<ArrayDataRef> implementations should validate data type Apr 26, 2021
@alamb
Copy link
Contributor Author

alamb commented Oct 29, 2021

This is a specific case of the general issue described in #817, so closing this one as a duplicate in favor of the more general ticket.

@alamb alamb closed this as completed Oct 29, 2021
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 security
Projects
None yet
Development

No branches or pull requests

2 participants