Repository navigation
Read Iceberg catalog once during cluster requests. #2729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zvonand
merged 8 commits into
antalya-26.8
from
bugfix/antalya-26.8/object-storage-cluster-catalog-once
Nov 24, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e846234
Reuse the resolved query tree for `object_storage_cluster` headers
ianton-ru dbe0f46
Limit catalog header reuse to `DataLakeCatalog` tables
ianton-ru f281aab
Reuse the resolved left-scan tree for `DataLakeCatalog` joins
ianton-ru 6a9a4cb
Renumber `DataLakeCatalog` cluster headers to the shard `__table1` alias
ianton-ru 2a4e242
Plan secondary `DataLakeCatalog` cluster reads at `FetchColumns` from…
ianton-ru b2f917c
Renumber the resolved left-scan header for `DataLakeCatalog` joins to…
ianton-ru fc2959e
Document why only `DataLakeCatalog` reuses the resolved tree for clus…
ianton-ru 647709e
Check `count()` and `UNION ALL` results for catalog cluster reads
ianton-ru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -203,6 +203,10 @@ class StorageObjectStorageCluster : public IStorageCluster | |
|
|
||
| /// Whether this query is served by `pure_storage` instead of being distributed over a cluster. | ||
| bool readsFromPureStorage(ContextPtr context) const; | ||
| /// Only `DataLakeCatalog` tables may reuse the resolved query tree for the header. Re-analyzing their | ||
| /// AST resolves the table through the REST catalog again. Other cluster reads keep re-analyzing the AST, | ||
| /// so their headers do not change. | ||
| bool canReuseResolvedQueryTreeForHeader() const override { return is_datalake_catalog_table; } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why only catalogs can do it? |
||
|
|
||
| void readFallBackToPure( | ||
| QueryPlan & query_plan, | ||
|
|
@@ -243,6 +247,8 @@ class StorageObjectStorageCluster : public IStorageCluster | |
| const ObjectStoragePtr object_storage; | ||
| /// True for explicit *Cluster(...); false for SETTINGS / ENGINE / DataLake paths. | ||
| bool cluster_name_from_function_argument = false; | ||
| /// True only for tables resolved through a `DataLakeCatalog` database. | ||
| bool is_datalake_catalog_table = false; | ||
|
|
||
| /// non-clustered storage to fall back on pure realisation if needed | ||
| std::shared_ptr<StorageObjectStorage> pure_storage; | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I would make this comment a bit more descriptive, something along the following lines:
I still don`t understand case 2 very well tho, looking into it