- 
        Couldn't load subscription status. 
- Fork 1k
Closed
Labels
Description
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