plusplusjiajia opened a new pull request, #10856: URL: https://github.com/apache/paimon/pull/10856
### Purpose On a table with snapshots, PyPaimon only rejected changes to the immutable options. Java `SchemaManagerUtils.checkAlterTableOption` and `checkResetTableOption` also reject: - changing `bucket` from or to `-1`, and resetting `bucket`; - changing `deletion-vectors.enabled` unless `deletion-vectors.modifiable` is true; - changing `ignore-delete`, `ignore-update-before` or `data-evolution.nested-field.enabled` from true to false; - changing or resetting `clustering.columns` when `pk-clustering-override` is set. Accepting them re-buckets or merges existing keys differently, which can produce duplicate rows in primary-key tables. These checks are now ported with Java's messages, and `bucket-function.provider` is added to the immutable options as in Java. As in Java: - the checks compare with the table's options before the batch, while changes still apply in order within the batch; - the rejections, including the existing immutable option rejection, raise `NotImplementedError`, Python's counterpart of `UnsupportedOperationException`, instead of `ValueError`; - `bucket` is parsed like `Integer.parseInt`. Option values are compared as PyPaimon reads them, including native values, enums and boolean spellings such as `yes`. ### Tests - `TestAlterTableOptions` in `schema_manager_test.py`: immutable options, bucket changes and parsing, deletion vectors, options that cannot be disabled, clustering columns, the checks only applying with snapshots, native option values, comparison with the original options within a batch, and unchanged values written differently. - `FileSystemCatalogTest#test_alter_immutable_options`: the catalog rejects these changes without creating a new schema. - The 11 tests fail on master. The schema manager and catalog tests pass locally: 80 tests. flake8 is clean. -- 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]
