viz: coherent operator notation across the logical and circuit views - #43
Merged
balegas merged 1 commit intoJul 22, 2026
Merged
Conversation
balegas
force-pushed
the
viz/aggregation-operator-notation
branch
2 times, most recently
from
July 21, 2026 11:57
8a35513 to
fdf329c
Compare
Three operator-notation fixes so the same operator reads the same in both the logical view and the dbsp circuit view. 1. Aggregation Σ → γ. The visualizer already uses relational-algebra symbols (σ filter, ⋈ join, π projection); aggregation was labelled Σ, which is summation, not the aggregation operator. γ is the standard grouping/ aggregation symbol. Only the operator markers change (legend "aggregate"/ "fold", the agg/fold node tags, README). The Σ that denotes genuine summation is kept — "Σ of Z-set weights", `fold(Σ value·w)` — so a γ node now reads as the aggregation operator implemented as a fold computing Σ. 2. The engine's circuit-view fold label dropped its `Σ ` prefix (introspection.rs): it emitted "Σ COUNT(*)" while the logical view showed "COUNT(*)". Now both views show "COUNT(*)"; the γ operator identity lives in the node tag (γ FOLD · STATE), verified live in the visualizer. 3. Subquery inner set: arrange → distinct in the logical view. The logical node was tagged IN-SET ARRANGE while its circuit-view counterpart is DISTINCT (and the node's own formula/sublabel already said distinct), so a reader tracing the inner set saw two names. Unify on distinct — the DBSP operator (paper Table 4.2 spells `distinct`, not δ; the blog diagram agrees). "arrange" stays only for op-arrange, the genuinely different physical node (feed set / params index). Verified: pipeline-viz build-graph + build-circuit tests pass (15); the rebuilt engine emits "COUNT(*)" and both views render γ FOLD / distinct, confirmed in the running visualizer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
balegas
force-pushed
the
viz/aggregation-operator-notation
branch
from
July 21, 2026 12:28
fdf329c to
4ec8147
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.
Operator-notation fixes so the same operator reads the same in the logical view and the dbsp circuit view. Verified live in the running visualizer (Playwright).
1. Aggregation
Σ→γThe visualizer already uses relational-algebra operator symbols — σ (filter), ⋈ (join), π (projection). Aggregation was the odd one out, labelled Σ, which denotes summation, not the aggregation operator. γ is the standard grouping/aggregation symbol.
Σ aggregate→γ aggregate(logical),Σ fold→γ fold(circuit)Σ FOLD · STATE→γ FOLD · STATE,DBSP COUNTS · Σ STATE→DBSP COUNTS · γ STATEintrospection.rs): the circuit-view fold label dropped itsΣprefix — it emittedΣ COUNT(*)while the logical view showedCOUNT(*). Both views now showCOUNT(*); the γ identity lives in the node tag (γ FOLD · STATE).The Σ that denotes genuine summation is kept —
Σ of Z-set weights,matching rows (Σ weights), and the fold formulasfold(Σ value·w over σ(where)). A γ node now reads as the aggregation operator implemented as a fold that computes Σ value·w.2. Subquery inner set:
arrange→distinctin the logical viewThe logical-view inner-set node was tagged IN-SET ARRANGE, while its circuit-view counterpart (
op-distinct) is DISTINCT — and the logical node's own formula (distinct(π(proj)·σ(where)·inner)) and sublabel (distinct project_id) already said distinct. So a reader tracing the subquery inner set saw two names.Unify on distinct — the DBSP operator (paper Table 4.2 spells
distinct, not the RA symbol δ; the blog's subquery diagram agrees):IN-set arrange→IN-set distinct, tagIN-SET ARRANGE · STATE→IN-SET DISTINCT · STATEarrange (state)→distinct (state)arrangestays only for op-arrange — the genuinely different physical node (a subquery shape's feed set / a family's params index).Not changed:
distinctnever becameδDBSP notates distinct as the word, so the visualizer keeps it as
distinctin both views (matching the blog diagram). Noδis introduced.Verification
vitest run apps/pipeline-viz/src/build-graph.test.ts apps/pipeline-viz/src/build-circuit.test.ts→ 15 passedΣ COUNT(*)), and every keptΣis genuine summation.🤖 Generated with Claude Code