JingsongLi commented on code in PR #752:
URL: https://github.com/apache/paimon-rust/pull/752#discussion_r3893694655


##########
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 =>

Review Comment:
   [P1] Keep the index layout immutable for dynamic table copies too
   
   This guard only covers catalog `ALTER TABLE`, but the public 
`Table::copy_with_options` path still merges `index-file-in-data-file-dir` 
through `TableSchema::copy_with_options`. Every new resolver then reads that 
overridden value. For example, a persisted `true` table copied with `false` 
looks for its bucket-local deletion/vector/full-text indexes under 
`<table>/index`; the inverse misses indexes stored there. More seriously, a 
write/commit built from such a copy can place new hash/DV index files according 
to the temporary value while committing name-only manifest entries to a table 
whose persisted schema retains the opposite value, so a normally reloaded table 
cannot resolve those files and abort cleanup can use the wrong layout. Please 
pin this option to the stored schema value (including the default `false`) or 
reject dynamic overrides, as is already done for other safety-sensitive 
options, and cover both read and write copies in a regression test.



-- 
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]

Reply via email to