[core] jdbc catalog: make warehouse path optional#8111
Draft
nickdelnano wants to merge 4 commits into
Draft
Conversation
Enable users to specify custom storage locations for individual tables via CoreOptions.PATH, replicating the pattern already used by HiveCatalog. The catalog-level warehouse becomes a default, but individual tables can live at arbitrary paths persisted in paimon_table_properties. Key changes: - JdbcUtils: add getTableProperty() to fetch a single table property - JdbcCatalog: override allowCustomTablePath(), getTableLocation() - createTableImpl: use initialTableLocation(), store path for custom tables - dropTableImpl: skip filesystem deletion for custom-path tables - renameTableImpl: skip filesystem rename for custom-path tables - alterTableImpl: preserve custom path across property refresh - dropDatabaseImpl/repairTable: always manage table properties Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom table path support is now only available when syncTableProperties is enabled, preserving the existing default behavior when sync is off. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Consolidate getTableLocation + isCustomTablePath into a single fetchStoredPathIfSyncEnabled call in dropTableImpl and renameTableImpl - Document that repairTable cannot recover custom-path tables when all JDBC metadata is lost - Fix stale "Hive Metastore" comment in renameTableImpl Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f3e8ecb to
677b7f7
Compare
677b7f7 to
5f11dbf
Compare
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
My platform based on Paimon has many tables across many warehouses. This requires users to have many
CREATE CATALOGstatements with manywarehousevalues. This is inconvenient and I'd like to simplify the platform usage. Jdbc catalog already has information that can be used to derive location, so warehouse can become optional.The primary use case is to infer table locations in the read path. It will also work in the write path if the database already exists in jdbc catalog.
Summary
Make warehouse path optional for jdbc catalog. Table location is resolved in the order of:
Built on top of #7475 (custom table path support for JDBC catalog)
Tests
Unit tests