SteNicholas commented on code in PR #1447:
URL: https://github.com/apache/paimon-rust/pull/1447#discussion_r4610031767
##########
crates/paimon/src/spec/schema.rs:
##########
@@ -672,8 +672,7 @@ impl TableSchema {
),
});
}
- fields[idx] = DataField::new(old.id(),
old.name().to_string(), target)
- .with_description(old.description().map(|s|
s.to_string()));
+ fields[idx] = old.clone().with_data_type(target);
Review Comment:
Addressed in ef1ed0dc. Type changes now validate the retained default
against the target type before replacing the field or publishing the schema.
The validation shares the Format Table writer's default parser, including quote
handling and null-result rejection.
The catalog regression covers positive and negative INT overflow, quoted
defaults and valid narrowing cases. It verifies that rejected ALTERs leave the
schema and version list unchanged and that `new_write()` still succeeds. The
relevant schema, default-parser and catalog tests pass.
--
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]