jerry-024 commented on code in PR #573:
URL: https://github.com/apache/paimon-rust/pull/573#discussion_r3621802910
##########
crates/paimon/src/spec/schema.rs:
##########
@@ -453,6 +453,15 @@ impl TableSchema {
new_schema.highest_field_id =
highest_field_id.max(Self::current_highest_field_id(&new_schema.fields));
+ if PartialUpdateConfig::new(&new_schema.options).is_enabled()
Review Comment:
**[major] Preserve the one-way `ignore-delete` invariant across merge-engine
changes**
This guard only runs when the resulting schema is still `partial-update`, so
the invariant can be bypassed across schema versions:
1. start with `merge-engine=partial-update` and `ignore-delete=true`
2. set `merge-engine=deduplicate` (this guard is disabled)
3. set `ignore-delete=false` or remove it (this guard is still disabled)
4. set `merge-engine=partial-update` again (the previous effective value is
already false)
All calls to `apply_changes` succeed, and historical `DELETE` /
`UPDATE_BEFORE` rows can become unreadable again. The Java
`SchemaManager.checkAlterTableOption` enforces the `true -> false` restriction
on the option itself, independent of merge engine.
Please preserve the effective true state across engine changes, or reject
disabling/removing it whenever the current schema has it enabled. A regression
test covering the four-step transition above would catch 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]