alamb commented on code in PR #7250:
URL: https://github.com/apache/arrow-rs/pull/7250#discussion_r1986052414
##########
parquet/src/arrow/array_reader/primitive_array.rs:
##########
@@ -194,7 +190,7 @@ where
},
PhysicalType::FLOAT => Arc::new(Float32Array::from(array_data)),
PhysicalType::DOUBLE => Arc::new(Float64Array::from(array_data)),
- PhysicalType::INT96 =>
Arc::new(TimestampNanosecondArray::from(array_data)),
+ PhysicalType::INT96 =>
Arc::new(FixedSizeBinaryArray::from(array_data)),
Review Comment:
as @tustvold mentions, for performance reasons I think this would have to
`match` on the `array_data.data_type` to directly create `FixedSizeBinaryArray`
or `TimestampNanosecondArray` (as is done for the PhysicalType::INT32 array
above for example)
##########
parquet/src/arrow/array_reader/primitive_array.rs:
##########
@@ -160,10 +159,7 @@ where
}
PhysicalType::FLOAT => ArrowType::Float32,
PhysicalType::DOUBLE => ArrowType::Float64,
- PhysicalType::INT96 => match target_type {
- ArrowType::Timestamp(TimeUnit::Nanosecond, _) =>
target_type.clone(),
- _ => unreachable!("INT96 must be timestamp nanosecond"),
- },
+ PhysicalType::INT96 => ArrowType::FixedSizeBinary(12),
Review Comment:
I suggest matching here on the target type to allow either fixed size binary
or timestamp
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]