Repository navigation
[python] Load system tables and reject branches in JDBC get_table - #10896
Open
plusplusjiajia wants to merge 1 commit into
Open
plusplusjiajia wants to merge 1 commit into
plusplusjiajia wants to merge 1 commit into
Conversation
JdbcCatalog.get_table ignored the $ suffix of the identifier: for example
db.t$snapshots, db.t$options and db.t$nosuch all returned the data table,
and db.t$branch_dev returned a table with main's schema even when that
branch did not exist.
As in Java, system tables are now loaded through the shared system table
loader, as in the filesystem catalog, and unknown names raise
TableNotExistException. As in Java JdbcCatalog, a branch other than main
raises NotImplementedError; as in alter_table, only a branch in the name
counts, so Identifier('db', 't', branch='MAIN') still reads db.t.
plusplusjiajia
marked this pull request as ready for review
October 30, 2026 12:17
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
JdbcCatalog.get_tableignored the$suffix of the identifier. For example,db.t$snapshots,db.t$optionsanddb.t$nosuchall returned the data table, anddb.t$branch_devreturned a table with main's schema even when that branch did not exist.As in Java
AbstractCatalog.getTable, system tables are now loaded through the shared system table loader, as in the filesystem catalog, and unknown system table names raiseTableNotExistException. As in JavaJdbcCatalog.loadTableSchema(assertMainBranch), a branch other than main raisesNotImplementedError, Python's counterpart ofUnsupportedOperationException. As inalter_table, only a branch in the name counts, soIdentifier('db', 't', branch='MAIN')still readsdb.t.Tests
JdbcCatalogTest#test_get_system_table:$options,$OPTIONSand$branch_main$optionsload the options system table of the data table, by name and byIdentifier.JdbcCatalogTest#test_get_system_table_not_exist: unknown system tables and system tables of missing tables raiseTableNotExistException.JdbcCatalogTest#test_get_table_branch: main branch identifiers read the table, and other branches, also with a system table suffix, raiseNotImplementedError.catalog_table_guard_test.py: the shared guard test no longer expects JDBC to read$branch_dev.jdbc_catalog_test.pyandcatalog_table_guard_test.py. flake8 is clean.