superserious-dev commented on code in PR #7644: URL: https://github.com/apache/arrow-rs/pull/7644#discussion_r2143433558
########## parquet-variant/src/decoder.rs: ########## @@ -90,6 +113,89 @@ pub(crate) fn decode_int8(value: &[u8]) -> Result<i8, ArrowError> { Ok(value) } +/// Decodes an Int16 from the value section of a variant. +pub(crate) fn decode_int16(value: &[u8]) -> Result<i16, ArrowError> { + let value = i16::from_le_bytes(array_from_slice(value, 1)?); + Ok(value) +} + +/// Decodes an Int32 from the value section of a variant. +pub(crate) fn decode_int32(value: &[u8]) -> Result<i32, ArrowError> { + let value = i32::from_le_bytes(array_from_slice(value, 1)?); Review Comment: Made the change to shift the base offset to 0. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org