Skip to content

RecordReader Permits Illegal Types #1132

@tustvold

Description

@tustvold

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

Metadata

Metadata

Assignees

Labels

bugparquetChanges to the parquet crate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions