Repository navigation
Conversation
…ersion properties
Fokko
reviewed
Dec 3, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Thanks @AllyNav! Verified against Java: JdbcUtil.SCHEMA_VERSION_PROPERTY is jdbc.schema-version and INIT_CATALOG_TABLES_PROPERTY is jdbc.init-catalog-tables, with SchemaVersion.V0/V1 enum values, so accepting them as fallbacks with native-key precedence matches. Tests pass locally (29 passed).
Two small things:
- The error message for an invalid
jdbc.schema-versionnow prints the raw value, which I think is actually an improvement, just noting the message changed for users of the Python key too. - Nit: in
tests/catalog/test_sql.py, the two new test functions repeat theSqlCatalog(...)constructor a lot, any appetite for@pytest.mark.parametrizeon the precedence cases? Feel free to ignore.
Author
|
Thanks for the review @Fokko! Good call on @pytest.mark.parametrize, I refactored both new tests in tests/catalog/test_sql.py to parametrize the fallback and precedence cases. |
This branch has not been deployed
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.
Part of #4140
Rationale for this change
Java configs set
jdbc.init-catalog-tablesandjdbc.schema-version(with values such asV0/V1) forJdbcCatalog, whileSqlCatalogonly readinit_catalog_tablesand lowercaseschema_version.SqlCatalog._init_catalognow accepts both the existing Python keys and the Javajdbc.*keys viaget_first_property_value, keepinginit_catalog_tablesandschema_versionas higher precedence so existing Python configurations continue working unchanged, and normalizesschema_versioncase soV0/V1andv0/v1both work.Are these changes tested?
Added unit tests in
tests/catalog/test_sql.pycovering:jdbc.init-catalog-tables(false/true) and precedence wheninit_catalog_tablesis also set.jdbc.schema-version(V1migration fromv0, invalid value error) and precedence whenschema_versionis also set.pytest tests/catalog/test_sql.py(29 passed) andprek run -a(all pre-commit hooks passed).Are there any user-facing changes?
Yes.
SqlCatalogacceptsjdbc.init-catalog-tablesandjdbc.schema-versionas fallbacks forinit_catalog_tablesandschema_version.