JingsongLi commented on PR #977: URL: https://github.com/apache/paimon-rust/pull/977#issuecomment-5934863288
[P2] Keep `ignore_if_not_exists` scoped to a missing table At `crates/paimon/src/catalog/rest/rest_catalog.rs:393-401`, swallowing `ColumnNotExist` changes an existing-table schema failure into success. The Rust `Catalog::alter_table` contract and `FileSystemCatalog` apply this flag only when the table is absent; SQLContext passes the `ALTER TABLE IF EXISTS` table flag here. Using the real `FsRestCatalogServer`, I submitted `[ADD COLUMN extra INT, DROP COLUMN ghost]` on an existing table with `ignore_if_not_exists=true`. The filesystem catalog returned `ColumnNotExist`, while this PR's REST client returned `Ok(())`; reloading the table showed only the original fields, because the server atomically rejected the batch. A caller can therefore proceed believing its added column was persisted. Running the same probe with these production files restored to the exact PR baseline returns a REST error instead of success. Java RESTCatalog currently has a similar swallowing behavior, so this is not a claim that it is stricter. The issue is the newly introduced Rust-server/Rust-SQL regression and inconsistency with the declared Rust/backend contract. Please retain the new COLUMN error mapping but ignore only `TableNotExist`; add an existing-table batch-error regression case and adjust the new test which currently expects the column error to be swallowed. Validation on head `1eb76d4052f9cd727ff331d1f12be011cd4869c5`: all 11 real REST-server end-to-end tests and 7 REST catalog/token unit tests passed. The additional batch probe fails on this head and passes against the baseline production files. -- 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]
