sunchao commented on issue #5325: URL: https://github.com/apache/arrow-rs/issues/5325#issuecomment-1908538908
> Right, the part that confused me is the from_bytes constructor doesn't perform the same conversion. So it isn't clear whether the bytes stored are little or big endian... I think the input of `from_bytes` is already big-endian as per Parquet spec: https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#decimal, so no conversion required. This is also another reason for using big-endian for `i32` and `i64`. In the [original PR](https://github.com/sunchao/parquet-rs/pull/103/files#diff-ac59c9971451a05b1dde153c4cdc20b2a05c6a3b3635d15fb62ab0347f78eea4R560), when converting the decimal values to strings, it just need to call `BigInt::from_signed_bytes_be` without having to treat `i32`/`i64` separately. -- 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]
