Skip to content

Antalya 26.3: Cluster Joins part 2 - global mode#1782

Open
ianton-ru wants to merge 4 commits into
antalya-26.3from
frontport/antalya-26.3/json_part2
Open

Antalya 26.3: Cluster Joins part 2 - global mode#1782
ianton-ru wants to merge 4 commits into
antalya-26.3from
frontport/antalya-26.3/json_part2

Conversation

@ianton-ru
Copy link
Copy Markdown

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Cluster Joins part 2 - global mode

Documentation entry for user-facing changes

Frontport of #1527

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

@ianton-ru ianton-ru added antalya port-antalya PRs to be ported to all new Antalya releases antalya-26.3 labels May 12, 2026
@ianton-ru
Copy link
Copy Markdown
Author

@codex review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Workflow [PR], commit [b63ad83]

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01d8b03ac1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +318 to +323
if (info.has_join || info.has_cross_join || info.has_local_columns_in_where)
{
auto modified_query_tree = query_info.query_tree->clone();

rewriteJoinToGlobalJoin(modified_query_tree, context);
modified_query_tree = buildQueryTreeForShard(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Rewrite non-GLOBAL IN predicates in global join mode

When object_storage_cluster_join_mode='global', this branch also runs for has_local_columns_in_where, but the rewrite path only calls rewriteJoinToGlobalJoin (JOIN-only) before buildQueryTreeForShard. For queries like ... WHERE value IN (SELECT id FROM local_table) (no JOIN/CROSS JOIN), the IN remains non-GLOBAL, so the subquery still executes on shards and fails if local_table exists only on the initiator. This is a correctness regression in the newly added global mode path because it now claims to handle local-column WHERE cases but does not transform plain IN subqueries.

Useful? React with 👍 / 👎.

Comment on lines +654 to +656
temporary_table_expression_node->setAlias(join_table_expression->getAlias());

replacement_map.emplace(join_table_expression.get(), std::move(temporary_table_expression_node));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve descendant source mappings for CROSS JOIN replacements

In the new CrossJoinNode branch, only the top-level table expression is inserted into replacement_map. Unlike the JOIN path just above, descendants are not mapped, so compound right-side expressions (for example an ARRAY_JOIN table expression) can leave ColumnNode source weak pointers referencing nodes from the old subtree after cloneAndReplace, which can later surface as logical exceptions during analysis/execution. The replacement needs the same descendant remapping done for JOIN replacements.

Useful? React with 👍 / 👎.

@svb-alt svb-alt added the forwardport This is a frontport of code that existed in previous Antalya versions label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

antalya antalya-26.3 forwardport This is a frontport of code that existed in previous Antalya versions port-antalya PRs to be ported to all new Antalya releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants