You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove object_storage_cluster_join_mode='local' — it is now equivalent to 'allow' #1827
After upstream PR ClickHouse/ClickHouse#94748 (Fix invalid result of joining two -Cluster table functions, commit 5b364db3ae0, merge 2b769e0ae56, present on antalya-26.3 but not on antalya-26.1/25.8), the analyzer unconditionally wraps the leftmost IStorageCluster table in a subquery whenever a JOIN is present. As a result, object_storage_cluster_join_mode='local' and 'allow' are now behaviorally indistinguishable.
The local-mode code path in IStorageCluster is dead code for cluster-leftmost JOINs.
Why local is now redundant
src/Planner/PlannerJoinTree.cpp:2828–2865 rewrites the query tree from
SELECT … FROM cluster_fn(...) AS t1 JOIN local AS t2 ON …
into
SELECT … FROM (SELECT<cols>FROM cluster_fn(...)) AS t1 JOIN local AS t2 ON …
before IStorageCluster::read is called. IStorageCluster then receives only the inner column-fetch subquery — no JOIN, no CROSS JOIN, no local-column WHERE. So:
IStorageCluster::updateQueryWithJoinToSendIfNeeded (src/Storages/IStorageCluster.cpp:212–303): getQueryTreeInfo reports no join ⇒ the LOCAL branch is a no-op, identical to the ALLOW branch.
IStorageCluster::getQueryProcessingStage (src/Storages/IStorageCluster.cpp:628–651): same — both modes fall through to the same WithMergeableState path.
The JOIN executes on the initiator regardless of mode; shards only see SELECT cols FROM cluster_fn(...).
Activity
ianton-ru commentedon Aug 13, 2026
Can be done after merge #2146
ianton-ru commentedon Nov 4, 2026
Solved in #2228