Repository navigation
[Prototype] Unified Unity Catalog to support both Iceberg and Delta table via a single endpoint. - #100669
[Prototype] Unified Unity Catalog to support both Iceberg and Delta table via a single endpoint. #100669melvynator wants to merge 1 commit into
Conversation
Introduces a new catalog_type='unity_catalog' for DataLakeCatalog that provides a single database for both Delta and Iceberg tables in Databricks Unity Catalog, with automatic table format detection. Key changes: - New UnifiedUnityCatalog class supporting both PAT and OAuth (client_id:client_secret) authentication with token auto-refresh - Per-table format detection via securable_kind/data_source_format, routing Delta tables to DeltaLake reader and Iceberg/UniForm tables to Iceberg reader - DataLakeTableFormat enum added to TableMetadata for format-aware configuration selection - Table JSON caching from listing response to eliminate redundant per-table API calls for format detection
|
Ubuntu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Workflow [PR], commit [75adaaa] Summary: ❌
AI ReviewSummaryThis PR introduces PR Metadata
Missing context
Findings
Tests
ClickHouse Rules
Performance & Safety
User-Lens
Final Verdict
|
|
|
||
| std::shared_ptr<RestCatalog> UnifiedUnityCatalog::getIcebergRestCatalog() const | ||
| { | ||
| if (iceberg_rest_catalog) |
There was a problem hiding this comment.
UnifiedUnityCatalog is used concurrently from DatabaseDataLake::getTablesIterator, but bearer_token, token_expires_at, and iceberg_rest_catalog are mutated/read without synchronization (ensureBearerToken and getIcebergRestCatalog).
This introduces a real data race (undefined behavior): one thread can reset/recreate iceberg_rest_catalog while another thread is reading/using it, and token refresh can race too.
Please protect auth/catalog state with a dedicated mutex (or atomics + immutable swap pattern), and serialize refresh/init paths.
|
|
||
| LOG_DEBUG(log, "Processing Delta table {} is default readable {}", full_table_name, result.isDefaultReadableTable()); | ||
|
|
||
| if (result.requiresSchema()) |
There was a problem hiding this comment.
This path parses Delta schema unconditionally even after marking a table as unreadable.
In the previous UnityCatalog implementation, schema parsing exceptions were explicitly tolerated for unreadable/non-Delta tables so that metadata listing/SHOW CREATE could still work. Here that guard is gone, so unsupported tables with unexpected column types can throw and break metadata access instead of being represented as unreadable.
Please restore the conditional exception handling (ignore schema parsing exceptions when !result.isDefaultReadableTable()).
8d87ddc to
75adaaa
Compare
|
Dear @scanhex12, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
Closes #105038 |
| {"biglake", DatabaseDataLakeCatalogType::ICEBERG_BIGLAKE}, | ||
| {"paimon_rest", DatabaseDataLakeCatalogType::PAIMON_REST}}) | ||
| {"paimon_rest", DatabaseDataLakeCatalogType::PAIMON_REST}, | ||
| {"unity_catalog", DatabaseDataLakeCatalogType::UNITY_CATALOG}}) |
There was a problem hiding this comment.
Needs to be merged with the existing UNITY catalog.
I wanted to see if we could unify the 2 different catalog implementation we have for unity (delta and iceberg) in a single Database.
What I've added:
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add a new catalog type that unified the unity catalog endpoint with the Iceberg endpoint. ClickHouse will proactively use the right functions to rread the right table.
Documentation entry for user-facing changes