You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Describe the bug
Originally pointed out by @jorgecarleitao here.
It is currently possible to construct
RecordReader<T>
and by extensionPrimitiveArrayReader
with anyT: DataType
. This is despite an explicit assumption inRecordReader
's buffering logic thatDataType::T
can be zero-initialized and stored inMutableBuffer
.Fortunately
DataType::T: ParquetValueType
which is a sealed trait, however,ParquetValueType
is implemented for types such asInt96
andByteArray
which aren't POD.To Reproduce
Expected behavior
It shouldn't be possible to construct
PrimitiveArrayReader
with invalid typesThe text was updated successfully, but these errors were encountered: