JingsongLi commented on code in PR #752:
URL: https://github.com/apache/paimon-rust/pull/752#discussion_r3893715390
##########
crates/paimon/src/catalog/filesystem.rs:
##########
@@ -575,6 +587,18 @@ fn reject_table_type_changes(
message: format!("removing '{TABLE_TYPE_OPTION}' is not
supported"),
});
}
+ crate::spec::SchemaChange::SetOption { key, .. }
+ | crate::spec::SchemaChange::RemoveOption { key }
+ if key == INDEX_FILE_IN_DATA_FILE_DIR_OPTION =>
+ {
+ return Err(Error::Unsupported {
+ message: format!(
+ "changing '{INDEX_FILE_IN_DATA_FILE_DIR_OPTION}' is
not supported: \
Review Comment:
[P2] Preserve Java’s snapshot-aware/no-op immutable-option behavior
This arm rejects every set/remove of `index-file-in-data-file-dir`, even
before the table has its first snapshot and even when a `SetOption` repeats the
stored value. Upstream Java `SchemaManager` first computes `unchanged` and only
calls `checkAlterTableOption` when `hasSnapshots && !unchanged`; this lets
callers choose the layout through ALTER before the first write and makes schema
reconciliation/idempotent SETs succeed. The new Rust test instead cements
unconditional failure on an empty table. Please allow an exact no-op, allow an
actual change while there are no snapshots, and reject only an actual change
once snapshots exist; add coverage for all three cases.
--
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]