Skip to content

compute: columnar linear-join input (C4)#37752

Draft
antiguru wants to merge 1 commit into
columnar-c3-topk-inputfrom
columnar-c4-linear-join-input
Draft

compute: columnar linear-join input (C4)#37752
antiguru wants to merge 1 commit into
columnar-c3-topk-inputfrom
columnar-c4-linear-join-input

Conversation

@antiguru

Copy link
Copy Markdown
Member

Remove these sections if your commit already has a good description!

Motivation

Why does this change exist? Link to a GitHub issue, design doc, Slack
thread, or explain the problem in a sentence or two. A reviewer who has
no context should understand why after reading this section.

If this implements or addresses an existing issue, it's enough to link to that:
Closes
Fixes
etc.

Description

What does this PR actually do? Focus on the approach and any non-obvious
decisions. The diff shows the code --- use this space to explain what the
diff can't tell a reviewer.

Verification

How do you know this change is correct? Describe new or existing automated
tests, or manual steps you took.

Rework the linear-join source-key path to consume its input as a
`CollectionEdge` rather than decoding to `Vec` via `as_specific_collection`.
The `JoinedFlavor::Collection` variant now carries an edge, and the source
arrangement key is formed off it.

Pattern: C1-reuse (borrowed-push, zero-alloc), not the C3 fallback. The join's
source arrange already builds a `ColumnBuilder<((Row,Row),T,Diff)>` and arranges
via the `Col2Val` batcher family, so the keying operator pushes the key and
value borrowed with no owned `Row` per record. The keying-plus-arrange step is
factored into a new free fn `arrange_join_input` with a `Vec` arm (behaviorally
identical to before, same operator names) and a columnar arm reading via
`into_index_iter`, owning time and diff only on the error path.

The no-source-key path reads `input.collection` directly. The source-key path
still reads from an existing arrangement (already columnar internally) and wraps
its decoded rows as a `Vec` edge. Stage outputs and the final join output stay
`Vec` (the join output producer is a later migration node); `into_vec` is the
identity on the `Vec` arm, so Wave 1 is unchanged and the columnar arm is dead
in production.

Adds `arrange_join_input_arms_agree` (cross-arm agreement across several
timestamps plus a retraction) and `arrange_join_input_arms_agree_on_error_path`
(a fallible key drives every record onto the `try_extend` Err branch, covering
the columnar arm's `Columnar::into_owned` for time and diff and asserting both
arms produce identical errors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@antiguru
antiguru force-pushed the columnar-c4-linear-join-input branch from a31c0c4 to 69046c7 Compare July 20, 2026 16:06
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.

1 participant