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

RecordReader Permits Illegal Types #1132

Closed
tustvold opened this issue Jan 5, 2022 · 0 comments · Fixed by #1155
Closed

RecordReader Permits Illegal Types #1132

tustvold opened this issue Jan 5, 2022 · 0 comments · Fixed by #1155
Assignees
Labels
bug parquet Changes to the parquet crate

Comments

@tustvold
Copy link
Contributor

tustvold commented Jan 5, 2022

Describe the bug

Originally pointed out by @jorgecarleitao here.

It is currently possible to construct RecordReader<T> and by extension PrimitiveArrayReader with any T: DataType. This is despite an explicit assumption in RecordReader's buffering logic that DataType::T can be zero-initialized and stored in MutableBuffer.

Fortunately DataType::T: ParquetValueType which is a sealed trait, however, ParquetValueType is implemented for types such as Int96 and ByteArray which aren't POD.

To Reproduce

PrimitiveArrayReader::<ByteArrayType>::new(...)

Expected behavior

It shouldn't be possible to construct PrimitiveArrayReader with invalid types

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

Successfully merging a pull request may close this issue.

2 participants