Skip to content

[Safety] UnionBuilder Doesn't Check Types #1591

@tustvold

Description

@tustvold

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions