CTTY commented on code in PR #3564:
URL: https://github.com/apache/iceberg-rust/pull/3564#discussion_r4461313268
##########
crates/iceberg/src/spec/transform.rs:
##########
@@ -221,6 +221,9 @@ impl Transform {
(Self::Hour, PrimitiveLiteral::Int(ordinal)) =>
Self::human_hour(ordinal),
(_, value) => {
let field_type = field_type.as_primitive_type().unwrap();
+ // A value written before its source column was promoted (`int`
+ // to `long`, `float` to `double`) still carries the old type.
+ let value = value.promote_to(field_type).unwrap_or(value);
Review Comment:
I've added an assert in
`test_to_human_string_promotes_value_to_declared_type` to pin this
--
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]