plusplusjiajia opened a new pull request, #10841:
URL: https://github.com/apache/paimon/pull/10841
### Purpose
As in Java `AbstractCatalog` and `RESTCatalog`
(`CatalogUtils.checkNotSystemDatabase` / `checkNotSystemTable`),
`create_database`, `drop_database` and `alter_database` now reject the system
database `sys` with Java's message, and `create_table`, `drop_table`,
`rename_table` and `alter_table` reject tables in it (`ValueError` in Python,
`IllegalArgumentException` in Java).
PyPaimon's filesystem, JDBC and REST catalogs accepted them, so for example
`create_database('sys')` and `create_table('sys.t')` succeeded, although Java
resolves `sys.*` to global system tables and never sees such tables. The REST
catalog sent these requests to the server.
This follows #10822, which added the branch and system table checks.
### Tests
- `assert_table_guards`, shared by `CatalogTableGuardTest` (filesystem and
JDBC) and
`RESTCatalogTest#test_table_operations_reject_branch_and_system_tables`:
creating, dropping and altering `sys`, and creating, dropping, renaming to and
altering `sys.t` raise, and `sys` is not listed.
- The tests fail on master. The catalog, REST and JDBC tests pass locally:
609 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]