zhang-arvin commented on PR #9438: URL: https://github.com/apache/paimon/pull/9438#issuecomment-5574159204
Thanks @JingsongLi for the concrete guidance — agreed, the gap is real. Parsing `global-index.*` schema options only covers indexes whose metadata happens to be expressed as options; standard Global Index definitions live in the latest snapshot's index manifest, so `checkGlobalIndexConflicts` currently fails open for exactly the case in #9419. I'll rework the guard to follow the path you described: build the branch-specific `FileStoreTable` for the current schema, resolve the latest snapshot, scan with `table.store().newIndexFileHandler().scan(snapshot, filter)`, keep entries where `globalIndexMeta() != null`, and map the indexed field IDs back through `table.rowType()` — mirroring `DropGlobalIndexProcedure` and `MergeIntoUpdateChecker#checkUpdatedColumns`. The guard will fail closed: manifest-read failures will propagate instead of being swallowed, and a conflict still raises `UnsupportedOperationException` telling users to drop the Global Index first. The regression test will create and commit a real Global Index, assert that dropping an indexed column is rejected, then drop the index and assert the same schema change succeeds — no synthetic options. I'll also fix the checkstyle/import and trailing-whitespace failures from CI, and update this PR with the changes. -- 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]
