tustvold commented on code in PR #1762:
URL: https://github.com/apache/arrow-rs/pull/1762#discussion_r885459663
##########
parquet/src/data_type.rs:
##########
@@ -1194,8 +1196,8 @@ make_type!(
impl FromBytes for Int96 {
type Buffer = [u8; 12];
- fn from_le_bytes(_bs: Self::Buffer) -> Self {
- unimplemented!()
+ fn from_le_bytes(bs: Self::Buffer) -> Self {
+ Self::from_ne_bytes(bs)
Review Comment:
It looks correct to me, it is a bit funky because Int96 is internally
represented as a [u32; 3] with the least significant u32 first (i.e. little
endian).
So on a big endian machine, you need to decode to big endian u32, which are
then stored in a little endian array :exploding_head:
In practice Int96 is deprecated, and I'm not sure there are any big endian
platforms supported by this crate, but good to be thorough :+1:.
> how should i test this
It should be covered by the existing tests, I'll create a ticket for
clarifying how this is being handled crate-wide
--
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]