Skip to content

compute: columnar Constant output - #37766

Draft
antiguru wants to merge 2 commits into
columnar-p1-get-mfp-outputfrom
columnar-p2-constant
Draft

compute: columnar Constant output#37766
antiguru wants to merge 2 commits into
columnar-p1-get-mfp-outputfrom
columnar-p2-constant

Conversation

@antiguru

@antiguru antiguru commented Jul 21, 2026

Copy link
Copy Markdown
Member

Constant collections emit their output as the columnar edge.

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-p2-constant branch from 21f51b2 to 6f5df11 Compare July 22, 2026 16:25
@antiguru antiguru changed the title compute: columnar Constant output (P2) compute: columnar Constant output Jul 22, 2026
@antiguru
antiguru force-pushed the columnar-p2-constant branch from 6f5df11 to 3aa6002 Compare July 22, 2026 17:51
@antiguru
antiguru force-pushed the columnar-p2-constant branch from 3aa6002 to b04d92f Compare August 19, 2026 12:01
@antiguru
antiguru force-pushed the columnar-p2-constant branch from b04d92f to cfadadb Compare August 19, 2026 13:17
@antiguru
antiguru force-pushed the columnar-p2-constant branch 2 times, most recently from 104761d to 708eb84 Compare August 20, 2026 09:13
antiguru and others added 2 commits September 6, 2026 17:12
Build the `Constant` arm of `render_plan_expr` into a `Column` and return a
`CollectionEdge::Columnar`, flipping the constant literal source to emit the
columnar edge. The err collection stays row-based (out of scope).

The rows go through a `ConsolidatingColumnBuilder` via `to_stream_with_builder`
rather than a direct columnar build. The planner (`FoldConstants`) consolidates
constant rows by `(row, time)` at optimization time, but this arm then advances
every time to `as_of`, which can collapse distinct original times onto one
time and so reintroduce duplicates at the same `(row, time)`. Consolidating here
folds those within the batch, matching the standing producer rule. The constant
rows are already owned, so the give is a move into staging, not a new
allocation. The `as_of` advancement and `until` filtering are unchanged.

Test: extends degenerate.slt with a constant carrying duplicate rows (asserting
multiplicity survives the columnar edge) and a constant feeding an indexed view
and an aggregate, exercising the columnar producer against ArrangeBy and Reduce
consumers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The comment named the migration plan's node for this conversion, which means
nothing to a reader of the test.
@antiguru
antiguru force-pushed the columnar-p2-constant branch from 708eb84 to c0fe9e4 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