SteNicholas commented on code in PR #1447:
URL: https://github.com/apache/paimon-rust/pull/1447#discussion_r4610034495
##########
crates/paimon/src/spec/schema.rs:
##########
@@ -733,6 +732,8 @@ impl TableSchema {
new_schema.highest_field_id =
highest_field_id.max(Self::current_highest_field_id(&new_schema.fields));
+ super::generated_column::validate_evolution(&self.fields,
&new_schema.fields)?;
Review Comment:
Addressed in ef1ed0dc. `Schema::validate_final_schema` now enforces these
constraints for both CREATE and ALTER: generated columns must be top-level,
cannot have defaults and cannot be used as `rowkind.field`. Nested validation
recursively checks ROW, ARRAY, MULTISET and both MAP key/value types, matching
the Java checks.
Schema tests cover each invalid combination and a valid ordinary rowkind
field. Catalog regressions verify that adding a nested generated child or
selecting an existing generated column as `rowkind.field` fails without
publishing a schema or retaining earlier option changes from the same ALTER.
These 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]