compute: columnar FlatMap input, fueling preserved - #37758
Draft
antiguru wants to merge 2 commits into
Draft
Conversation
antiguru
force-pushed
the
columnar-c2-flatmap-input
branch
from
July 22, 2026 08:41
d6e8fb1 to
2500faf
Compare
antiguru
force-pushed
the
columnar-c2-flatmap-input
branch
from
July 22, 2026 16:24
2500faf to
88a16d7
Compare
antiguru
force-pushed
the
columnar-c2-flatmap-input
branch
from
July 22, 2026 17:50
88a16d7 to
33792e0
Compare
antiguru
force-pushed
the
columnar-c2-flatmap-input
branch
from
August 19, 2026 12:01
33792e0 to
67ec14d
Compare
antiguru
force-pushed
the
columnar-c2-flatmap-input
branch
3 times, most recently
from
August 20, 2026 09:13
bebbdd0 to
da910b5
Compare
Rework `render_flat_map` so the bespoke `FlatMapStage` consumes the input `CollectionEdge` directly instead of decoding it via `as_specific_collection` (which forces `into_vec`). The unarranged path reads the edge, so the columnar arm never decodes rows at the input; the keyed path still reads an existing arrangement, already columnar internally, presented as a `Vec` edge. The fuel machinery is the point of this operator: it bounds how much work a single `generate_series` can do before yielding the worker. To keep the `Vec` and columnar arms from drifting, the fuel queue, per-activation budget, and re-activation now live in one generic `flat_map_stage` function. The only arm-specific piece is how records are read from a queued batch, factored into a small `FlatMapBatch` trait: the `Vec` arm drains owned rows, the columnar arm iterates the borrowed column via `into_index_iter` and never materializes an owned `Row`. The per-record table-function expansion and mfp drain are shared in `process_flat_map_row`. FlatMap is explicitly not routed through `flat_map_datums`, which drains a full batch with no fuel budget. Producers still emit `Vec`, so the columnar arm is dead in production and this carries no runtime change. Two unit tests: `flat_map_fuel_bounds_per_activation` proves a small fuel budget spreads a multi-batch input across multiple activations while an unbounded budget drains it in one, and `flat_map_arms_agree` proves the `Vec` and columnar arms produce identical output across multiple timestamps including a retraction. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A per-record `inspect` needs `&Container: IntoIterator`, and on macOS resolving that recurses through `objc2`'s blanket impls until the trait solver overflows, so `lint-macos` fails to compile the test. Counting through the container avoids the resolution entirely. The same test reads the container directly from the commit that makes FlatMap's output columnar onward, so this only closes the window where it did not.
antiguru
force-pushed
the
columnar-c2-flatmap-input
branch
from
September 6, 2026 18:23
da910b5 to
7f2ef79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FlatMap reads its input from the columnar edge, preserving the existing fuel and backpressure behavior through a generic fueled stage operator.
Columnar dataflow-edge migration. Design doc:
doc/developer/design/20260720_columnar_dataflow_edges.md(#37744).Part of CPU-51.