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

[Safety] UnionBuilder Doesn't Check Types #1591

Closed
tustvold opened this issue Apr 19, 2022 · 0 comments · Fixed by #1589
Closed

[Safety] UnionBuilder Doesn't Check Types #1591

tustvold opened this issue Apr 19, 2022 · 0 comments · Fixed by #1589
Assignees
Labels

Comments

@tustvold
Copy link
Contributor

Describe the bug

The following code passes, despite transmuting memory in undefined ways

let mut builder = UnionBuilder::new_sparse(2);
builder.append::<Float32Type>("a", 1.0).unwrap();
builder.append::<Int32Type>("a", 1).unwrap();

let array = builder.build().unwrap();

To Reproduce

Test above

Expected behavior

UnionBuilder::append should error if the types don't match

Additional context
Add any other context about the problem here.

@tustvold tustvold added the bug label Apr 19, 2022
@tustvold tustvold self-assigned this Apr 19, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Apr 20, 2022
Various UnionArray fixes (apache#1598) (apache#1596) (apache#1591) (apache#1590)

Fix handling of null masks in ArrayData equality (apache#1599)
alamb pushed a commit that referenced this issue Apr 28, 2022
* Fix ListArray and StructArray equality (#626)

* Simplify null masking in equality comparisons

Various UnionArray fixes (#1598) (#1596) (#1591) (#1590)

Fix handling of null masks in ArrayData equality (#1599)

* Miscellaneous fixes

* Fix structure null equality

* Review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant