Skip to content

Backport/join enhancements#1094

Merged
yokofly merged 6 commits intodevelopfrom
backport/join-enhancements
Jan 27, 2026
Merged

Backport/join enhancements#1094
yokofly merged 6 commits intodevelopfrom
backport/join-enhancements

Conversation

@yokofly
Copy link
Copy Markdown
Collaborator

@yokofly yokofly commented Jan 27, 2026

PR checklist:

  • Did you run ClangFormat ?
  • Did you separate headers to a different section in existing community code base ?
  • Did you surround proton: starts/ends for new code in existing community code base ?

Please write user-readable short description of the changes:

yl-lisen and others added 5 commits January 27, 2026 08:53
(cherry picked from commit 723256e1ea9759e42959950ef67f7ea5143fcc43)
(cherry picked from commit 84f0d53dc612083e55a3ee28fdd55e2b3f0197f5)
Fix incorrect createColumn call on join clause

"changed" flag in system.settings is calculated incorrectly for settings with multiple values

EXPLAIN actions for JOIN step

Setting JoinAlgorithm respect specified order

Move setting `join_algorithm` to compat settings

* fixes ut

* better join step name

* fixes stateless test

* fixes stateless test - 2

---------

Co-authored-by: Alexey Milovidov <[email protected]>
Co-authored-by: alesapin <[email protected]>
Co-authored-by: vdimir <[email protected]>
Co-authored-by: Robert Schulze <[email protected]>
(cherry picked from commit fb43370909bdb911e8479556a0e2c045dc01cf89)
(cherry picked from commit 729cc33f9af38db875a9b46960b733a3f85a21c9)
(cherry picked from commit 2e5809ee54e73ccff614e14c78f42e19782d7a7d)
Copy link
Copy Markdown
Contributor

@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: f9dbcf6504

ℹ️ 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 +1410 to +1414
if (JoinPtr direct_kv_join = tryKeyValueJoin(analyzed_join, right_sample_block))
{
/// Do not need to execute plan for right part, it's ready.
joined_plan.reset();
return direct_kv_join;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Avoid returning DirectKeyValueJoin for streaming joins

In streaming plans (joined_plan->isStreaming()), the pipeline uses Streaming::JoinStep, which unconditionally treats the join as an IHashJoin (it does std::dynamic_pointer_cast<IHashJoin>(join) when building the output header and JoinTransform state). The new direct-key-value branch here can return DirectKeyValueJoin, which is not an IHashJoin. That makes the cast null and will crash or miscompute the header/transform when a streaming join hits a key-value right side with join_algorithm including direct (or default). This path didn’t exist before because streaming joins never returned DirectKeyValueJoin. Either guard against direct key‑value joins in streaming mode or teach Streaming::JoinStep/JoinTransform to handle non‑hash joins.

Useful? React with 👍 / 👎.

@yokofly yokofly merged commit 5f04663 into develop Jan 27, 2026
7 of 11 checks passed
@yokofly yokofly deleted the backport/join-enhancements branch January 27, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants