Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/engine/src/engine/introspection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ pub(crate) fn circuit_ops(
let snk_id = format!("snk:{sid}");

if let Some(agg) = &s.aggregate {
let fn_label = format!("Σ {}({})", format!("{:?}", agg.func).to_uppercase(), agg.col.as_deref().unwrap_or("*"));
let fn_label = format!("{}({})", format!("{:?}", agg.func).to_uppercase(), agg.col.as_deref().unwrap_or("*"));
if s.circuit.as_ref().is_some_and(|p| p.counts) {
// Counts-served: the fold's input is the counts pipeline's group deltas
// (`map_index(group) → weighted_count` in the circuit), NOT a σ over row
Expand Down
6 changes: 3 additions & 3 deletions apps/pipeline-viz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ of every node** on the canvas.
the same ids, so nothing is reconstructed client-side — what flashes is what ran, and the
counts you see are the engine's counters.
- **dbsp circuit** — the exploded operator dataflow, **emitted by the engine** (`/graph`'s
`operators`/`opEdges`): source → Δ → σ/↦/arrange/⋈/distinct/Σ → π → sink, one box per real
`operators`/`opEdges`): source → Δ → σ/↦/arrange/⋈/distinct/γ → π → sink, one box per real
execution step. Each operator carries the trace-hop id it animates under and (for the
state-bearing operator only) the state-summary id its chips show — declared bindings, not
client-side guesses. Dashed edges are stateful arrangements feeding joins; shared structure
Expand All @@ -26,9 +26,9 @@ In the Logical view each node card carries its dbsp identity and its live state:
- **↦⋈ route join · STATE** — the shared equality router: an arrangement of predicate keys →
shapes, one per family (`WHERE k = const` compiles to an index entry, not a circuit). Chips:
live routing-index keys + routed shapes.
- **IN-set arrange · STATE** — a shared subquery inner set (`value → contributing pks`), one per
- **IN-set distinct · STATE** — a shared subquery inner set (`value → contributing pks`), one per
distinct `IN (SELECT …)`. Chips: distinct values + refcount.
- **Σ fold · STATE** — a scalar aggregation maintained as an incremental fold. Chips: the current
- **γ fold · STATE** — a scalar aggregation maintained as an incremental fold. Chips: the current
value (live), matching-row count, and the MIN/MAX retraction-multiset size.
- **shape out · π** — the per-shape output stream (grouped by pk into upsert/delete envelopes).
Chip: envelopes emitted (backfill + live).
Expand Down
8 changes: 4 additions & 4 deletions apps/pipeline-viz/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ export default function App() {
<span className="lg lg-table">table · Δ source</span>
<span className="lg lg-filter">σ filter</span>
<span className="lg lg-family">↦⋈ route join</span>
<span className="lg lg-sqnode">IN-set arrange</span>
<span className="lg lg-agg">Σ aggregate</span>
<span className="lg lg-sqnode">IN-set distinct</span>
<span className="lg lg-agg">γ aggregate</span>
<span className="lg lg-shape">shape out</span>
{graph?.arrangements ? (
<span className="lg lg-serve" title="a chip on the card: the shape's data is seeded + maintained by the dbsp circuit">
Expand All @@ -905,9 +905,9 @@ export default function App() {
<span className="lg lg-delta">Δ change</span>
<span className="lg lg-filter">σ filter</span>
<span className="lg lg-index">↦ key</span>
<span className="lg lg-sqnode">arrange (state)</span>
<span className="lg lg-sqnode">distinct (state)</span>
<span className="lg lg-join">⋈ join</span>
<span className="lg lg-agg">Σ fold</span>
<span className="lg lg-agg">γ fold</span>
<span className="lg lg-shape">π · sink</span>
{graph?.arrangements ? <span className="lg lg-arr">dbsp index</span> : null}
{graph?.arrangements ? <span className="lg lg-arr-counts">dbsp counts</span> : null}
Expand Down
4 changes: 2 additions & 2 deletions apps/pipeline-viz/src/build-circuit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function restrictToSelection(
// 2. Subquery templates: subquery shapes whose maintained pipeline is structurally identical
// (same outer table, predicate template, projection) — differing only in their bound parameter
// and thus their materialized inner set — fold their inner-set chain (`sqf`/`sqp`/`dist`) into
// one stacked IN-SET ARRANGE and their outer chain (`sj`/`pi`/`snk`) into one stacked SINK.
// one stacked IN-SET DISTINCT and their outer chain (`sj`/`pi`/`snk`) into one stacked SINK.
// Both dimensions reduce to the same mechanism: a `redirect` map (collapsed operator id → the
// representative node that stands in for it) plus the representative nodes themselves. `collapse`
// then drops the collapsed operators, adds the representatives, and rewrites every edge endpoint
Expand Down Expand Up @@ -316,7 +316,7 @@ function planGroups(g: EngineGraph): GroupPlan {
ref,
},
})
// The inner-set chain (σ inner where → π proj → distinct) collapses to the IN-SET ARRANGE rep…
// The inner-set chain (σ inner where → π proj → distinct) collapses to the IN-SET DISTINCT rep…
for (const sig of sigs) {
redirect.set(`sqf:${sig}`, distId)
redirect.set(`sqp:${sig}`, distId)
Expand Down
8 changes: 4 additions & 4 deletions apps/pipeline-viz/src/node-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const KIND_META: Record<NodeKind, KindMeta> = {
sqnode: {
color: '#7e22ce',
bg: '#f3e8ff',
tag: 'IN-SET ARRANGE · STATE',
tag: 'IN-SET DISTINCT · STATE',
formula: 'distinct(π(proj) · σ(where) · inner)',
stateful: true,
inside:
Expand Down Expand Up @@ -92,7 +92,7 @@ export const KIND_META: Record<NodeKind, KindMeta> = {
agg: {
color: '#0d9488',
bg: '#ccfbf1',
tag: 'Σ FOLD · STATE',
tag: 'γ FOLD · STATE',
formula: 'fold(Σ value·w over σ(where))',
stateful: true,
inside:
Expand Down Expand Up @@ -192,7 +192,7 @@ export const KIND_META: Record<NodeKind, KindMeta> = {
'op-fold': {
color: '#0d9488',
bg: '#ccfbf1',
tag: 'Σ FOLD · STATE',
tag: 'γ FOLD · STATE',
formula: 'fold(Σ value·w)',
stateful: true,
inside:
Expand Down Expand Up @@ -256,7 +256,7 @@ export const KIND_META: Record<NodeKind, KindMeta> = {
'arr-counts': {
color: '#6d28d9',
bg: '#ede9fe',
tag: 'DBSP COUNTS · Σ STATE',
tag: 'DBSP COUNTS · γ STATE',
formula: 'map_index(group) · weighted_count',
stateful: true,
inside:
Expand Down
2 changes: 1 addition & 1 deletion apps/pipeline-viz/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ body,
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
}
}
/* Aggregation detail: the prominent live scalar stat (teal, matching the Σ node). */
/* Aggregation detail: the prominent live scalar stat (teal, matching the γ node). */
.dp-agg {
margin: 2px 0 10px;
padding: 8px 12px 9px;
Expand Down
Loading