Repository navigation
[python] Reject operations on the system database - #10841
Merged
JingsongLi merged 1 commit intoOct 28, 2026
Merged
JingsongLi merged 1 commit into
JingsongLi merged 1 commit into
Conversation
plusplusjiajia
marked this pull request as ready for review
October 27, 2026 14:59
As in Java AbstractCatalog and RESTCatalog, create_database,
drop_database and alter_database reject the system database sys, and
create_table, drop_table, rename_table and alter_table reject tables in
it, as Java's checkNotSystemTable does. 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.
plusplusjiajia
force-pushed
the
fix/python-reject-system-database-ops
branch
from
October 28, 2026 07:09
1543ebb to
1bcd70e
Compare
Contributor
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
As in Java
AbstractCatalogandRESTCatalog(CatalogUtils.checkNotSystemDatabase/checkNotSystemTable),create_database,drop_databaseandalter_databasenow reject the system databasesyswith Java's message, andcreate_table,drop_table,rename_tableandalter_tablereject tables in it (ValueErrorin Python,IllegalArgumentExceptionin Java).PyPaimon's filesystem, JDBC and REST catalogs accepted them, so for example
create_database('sys')andcreate_table('sys.t')succeeded, although Java resolvessys.*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 byCatalogTableGuardTest(filesystem and JDBC) andRESTCatalogTest#test_table_operations_reject_branch_and_system_tables: creating, dropping and alteringsys, and creating, dropping, renaming to and alteringsys.traise, andsysis not listed.