[core] Support custom table paths in JdbcCatalog#7475
Draft
tub wants to merge 3 commits intoapache:masterfrom
Draft
[core] Support custom table paths in JdbcCatalog#7475tub wants to merge 3 commits intoapache:masterfrom
tub wants to merge 3 commits intoapache:masterfrom
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>
Contributor
Author
|
@nickdelnano I built this on top of your table properties change. It'll allow folks to have a fully fledged catalog spanning multiple warehouses/buckets etc. |
- 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>
2 tasks
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.
Summary
CoreOptions.PATH, replicating the pattern already used by HiveCatalogwarehousebecomes a default, but individual tables can live at arbitrary paths persisted inpaimon_table_propertiesTest plan
testCreateTableWithCustomPath— schema at custom location,getTableLocation()returns it,pathstored in JDBCtestCreateTableWithCustomPathSyncDisabled—pathstored even whensyncTableProperties=falsetestDropTableWithCustomPath— JDBC cleaned up, data NOT deletedtestDropTableWithDefaultPath— data IS deleted (existing behavior preserved)testRenameTableWithCustomPath— metadata updated, path preserved, no filesystem renametestAlterTableWithCustomPath— path preserved after altertestLoadTableSchemaWithCustomPath— schema loads from custom locationtestGetTableLocationFallback—getTableLocation()returns default when no stored path🤖 Generated with Claude Code