Xuanwo commented on code in PR #837:
URL: https://github.com/apache/iceberg-rust/pull/837#discussion_r1900622944
##########
crates/iceberg/src/arrow/schema.rs:
##########
@@ -741,7 +766,7 @@ macro_rules! get_parquet_stat_as_datum {
};
Some(Datum::new(
primitive_type.clone(),
-
PrimitiveLiteral::Int128(i128::from_be_bytes(bytes.try_into()?)),
+
PrimitiveLiteral::Int128(i128::from_be_bytes(extend_to_i128_big_endian(bytes.into())?)),
Review Comment:
I revisited the code and found that the root cause might be that we didn't
handle the decimal bytes data correctly. By design, Iceberg only keeps the
smallest bits of the decimal. To decode it properly, we may need to follow the
same logic outlined here:
https://github.com/apache/iceberg-rust/blob/09fa1fa19488ab63c042aa692ac730fe1a7dc987/crates/iceberg/src/spec/values.rs#L436-L445
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]