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] PrimitiveArray::new can create arrays not in spec #18349

Closed
asfimport opened this issue Oct 31, 2020 · 1 comment
Closed

[Rust] PrimitiveArray::new can create arrays not in spec #18349

asfimport opened this issue Oct 31, 2020 · 1 comment
Assignees
Milestone

Comments

@asfimport
Copy link
Collaborator

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.

Reporter: Jorge Leitão / @jorgecarleitao
Assignee: Jorge Leitão / @jorgecarleitao

PRs and other links:

Note: This issue was originally created as ARROW-10448. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Neville Dipale / @nevi-me:
Issue resolved by pull request 8560
#8560

@asfimport asfimport added this to the 3.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants