Skip to content

compute: Emit TopK monotonic and basic output as the columnar edge - #37783

Draft
antiguru wants to merge 2 commits into
columnar-p5-arrangement-materializationfrom
columnar-p6-topk-output
Draft

compute: Emit TopK monotonic and basic output as the columnar edge#37783
antiguru wants to merge 2 commits into
columnar-p5-arrangement-materializationfrom
columnar-p6-topk-output

Conversation

@antiguru

@antiguru antiguru commented Jul 21, 2026

Copy link
Copy Markdown
Member

Monotonic and basic TopK emit their from_collections output as the columnar edge. Bucketed TopK is already covered by the shared arrangement-materialization path (P5).

Columnar dataflow-edge migration. Design doc: doc/developer/design/20260720_columnar_dataflow_edges.md (#37744).

Part of CPU-51.

@linear-code

linear-code Bot commented Jul 22, 2026

Copy link
Copy Markdown

CPU-51

@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from c790948 to 31a84a6 Compare July 22, 2026 16:24
@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from 31a84a6 to 2f27548 Compare July 22, 2026 17:51
@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from 2f27548 to 1536039 Compare August 19, 2026 12:01
@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from 1536039 to 15eb779 Compare August 19, 2026 13:17
@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from 15eb779 to 10e7a85 Compare August 20, 2026 08:49
@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from 10e7a85 to 8ee12e6 Compare August 20, 2026 09:13
antiguru and others added 2 commits September 6, 2026 17:12
Flip the two TopK plans that build a result collection (MonotonicTopK and Basic)
to produce a `CollectionEdge::Columnar` via a shared `topk_result_to_columnar`
helper. The bucketed MonotonicTop1 plan emits an arrangement and is materialized
by the shared `as_specific_collection` path, so it is untouched.

Both sites drop the hash-key pairing from a `consolidate_named`-consolidated
`(hash_key, row)` collection. The hash key is a function of the row, so the drop
is injective and the output has no within-batch duplicates. A non-consolidating
`ColumnBuilder` therefore matches the prior `map` semantics, and the row is
pushed borrowed.

The err collection stays `Vec`, and the intra-operator machinery stays on `Vec`.
Also corrects a stale comment on `map_topk_key`: its columnar arm runs once the
input edge is columnar, which the upstream producers now emit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment-only, no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antiguru
antiguru force-pushed the columnar-p6-topk-output branch from 8ee12e6 to 40d648a Compare September 6, 2026 18:23
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