diff --git a/.gitignore b/.gitignore index 3774bbbd1..fc28ab02d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,6 @@ # Cargo.lock is intentionally tracked (workspace builds binaries). -# Regenerated by tools/dag-viewer/generate-sample.sh; dag.example.json is the committed sample -/tools/dag-viewer/dag.json - # Python bytecode cache (tools/clickhouse/extract_functions.py) __pycache__/ *.pyc diff --git a/crates/devtools/tests/stage_pipeline.rs b/crates/devtools/tests/stage_pipeline.rs index 0cb261ec1..fce25c9c2 100644 --- a/crates/devtools/tests/stage_pipeline.rs +++ b/crates/devtools/tests/stage_pipeline.rs @@ -446,9 +446,9 @@ fn pass1_failure_still_writes_stage0_and_the_error() { assert!(document["stage3_plan_selection"]["selected"].is_null()); } -/// The scalar-queries viewer fixture: standalone scalar queries first, in -/// the middle and last, which the physical DAG keeps in `scalar_roots`. -const SCALAR_QUERIES: &str = "../../tools/dag-viewer/examples/scalar-queries.json"; +/// Standalone scalar queries first, in the middle and last, which the +/// physical DAG keeps in `scalar_roots` by query position (the viewer's +/// test_viewer.py draws this workload). const SCALAR_QUERIES_ARGS: &[&str] = &[ "--promql", "scalar(sum(m))", @@ -463,14 +463,8 @@ const SCALAR_QUERIES_ARGS: &[&str] = &[ ]; #[test] -fn scalar_queries_fixture_is_current() { +fn scalar_queries_keep_their_positions_in_scalar_roots() { let document = document_of(SCALAR_QUERIES_ARGS); - let committed: Value = serde_json::from_str( - &std::fs::read_to_string(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(SCALAR_QUERIES)) - .unwrap(), - ) - .unwrap(); - assert_eq!(document, committed, "regenerate the committed fixture"); let selected = document["stage3_plan_selection"]["selected"] .as_str() .unwrap(); diff --git a/tools/dag-viewer/.gitignore b/tools/dag-viewer/.gitignore new file mode 100644 index 000000000..89f9ac04a --- /dev/null +++ b/tools/dag-viewer/.gitignore @@ -0,0 +1 @@ +out/ diff --git a/tools/dag-viewer/README.md b/tools/dag-viewer/README.md index 182c0f94c..9e4a341ba 100644 --- a/tools/dag-viewer/README.md +++ b/tools/dag-viewer/README.md @@ -1,201 +1,131 @@ -# ASAP Pre/Post-ASAP DAG viewer - -The viewer has one visualization mode: **Pre/Post-ASAP**. - -- Select one query to see that query's complete pre-ASAP and post-ASAP DAGs. -- Select multiple queries to see two workload-union DAGs: one pre-ASAP union - and one post-ASAP union. Nodes with the same exporter-assigned workload - identity are collapsed while query roots and ownership are retained. -- The **All** checkbox left of the query strip selects or deselects every - query at once, and shows an indeterminate state while only some are - selected. It changes the selection only; **Clear all** in the header is a - different operation and discards the loaded workload itself. -- Drag anywhere on the canvas to pan, including on a lane's own background. -- Pre-ASAP nodes show only their original IR content. -- Post-ASAP nodes show their translated IR content and the explicit planner - decision carried by that node. -- Click any edge to inspect its schema, source and target nodes, and how the - target operation derives its output schema in the details panel. -- The details panel shows the selected workload's bound table/metric schemas - and can be resized by dragging its left edge. -- A post-ASAP node whose winning decision carries a cost/benefit annotation - shows a concise `▼NN%`/`▲NN%` badge next to its label; the sidebar and the - workload-scope summary show the full baseline/selected/benefit breakdown, - with units and provenance, wherever the export provides one — see "Cost/ - benefit annotations" below. - -There are no separate Single, Compare, or Union modes. - -## Interactive query editor - -From the repository root: - -```sh -python3 tools/dag-viewer/server.py -``` - -Open , expand **Query editor**, add SQL or PromQL -queries, choose an epsilon, and click **Plan selected workload**. The backend -runs the real pipeline: - -1. SQL/PromQL parsing and lowering -2. pre-ASAP DAG generation -3. ASAP-aware mapping -4. post-ASAP DAG generation - -The editor includes built-in `metrics` and `hosts` table schemas. Enable the -schemas each SQL query uses with its checkboxes, or add a table with custom -columns using one readable `name TYPE [NOT NULL]` declaration per line and -an optional time-index column. The compact `name:type!` form remains accepted -for compatibility. These definitions are passed to `dag_export` and used by the SQL -schema_resolver; they are not display-only metadata. PromQL keeps its open metric -model and shows an inferred schema based on the labels and values used by the -query. The sidebar groups identical input schemas and lists every selected -query that uses each one. - -The Python terminal streams those stages while they run. The server binds to -localhost by default and invokes `dag_export` with an argv array, not a -shell command. - -## Export JSON directly - -```sh -cargo run -p asap-devtools --bin dag_export -- \ - --post-asap --epsilon 0.01 \ - --planner-cost-json "$PLANNER_PHYSICAL_EVIDENCE" \ - --sql "SELECT service, COUNT(*) FROM metrics GROUP BY service" --name q1 \ - > /tmp/dag.json -``` - -Load the JSON with the page's file picker. `--planner-cost-json` is a complete -physical-evidence document: an immutable `evidence_version`, calibration, and -target records containing the exact target node (a serialized pre-ASAP -`OperatorNode`) and comparison scope. -Each exact replacement candidate owns its complete logical-node -`PhysicalNodeEvidence`; summary candidates additionally own their bound -`PhysicalDAG`. Candidate-local evidence prevents statistics for one physical -alternative from satisfying another. Candidate matching includes the complete -exported plan, including accuracy guarantees, and never uses a hash or strategy -name; derived floating constants allow only a one-ULP JSON round-trip tolerance. -Duplicate, conflicting, unused, or missing records fail closed. The old -`--analytical-cost-json` spelling accepts the new document as an alias; its old -compact aggregation payload is rejected with a migration error. - -`--default-cost` is the alternative cost source for a workload with no -deployment to measure yet, and is mutually exclusive with -`--planner-cost-json`: - -```sh -cargo run -p asap-devtools --bin dag_export -- \ - --post-asap --default-cost --epsilon 0.01 \ - --sql "SELECT service, COUNT(*) FROM metrics GROUP BY service" --name q1 \ - > /tmp/dag.json -``` - -It ranks candidates with the planner's structural `DefaultCostModel`, so the -structure of the export is real — which replacements the search found, which -one won per group, and the merged post-ASAP DAG — while no cost is exported -at all. Every `CostAnnotation` stays `Unavailable` with no `value` and renders -as **Not estimated**; the structural ranking number is never serialized. Use -it to see what ASAPPlanner does with a workload before there is a deployment -to calibrate against, and `--planner-cost-json` once there is. - -Without either flag, `--post-asap` exports the raw DAG only. - -## Standalone HTML - -```sh -python3 tools/dag-viewer/render.py /tmp/dag.json -o /tmp/dag.html -``` - -The renderer embeds the workload and vendored JavaScript into one file. It -always opens in Pre/Post-ASAP mode; there is no `--mode` option. - -## JSON contract - -`NamedDAG.dag` is the original pre-ASAP DAG. `NamedDAG.post_dag` -is the complete translated DAG. Every post-ASAP node produced or carried by -a selected replacement directly contains: +# ASAPPlanner Stage Viewer + +A browser view of what the planner does with one workload, read from an +`asap-stage-pipeline/v1` document written by the `stage_pipeline` devtool: + +- **Stage 0**, the DAG the query-language frontends lower the queries into, + one root per query; +- **Stage 1**, the logical ASAP candidates: Pass 1's per-computation + choices, each followed by its Pass 2 identical-expression candidates; +- **Stage 2**, the physical candidate of each composed Stage 1 candidate, + or the reason Stage 2 pruned it; +- **Stage 3**, which checks every physical candidate, prices the valid ones + per second and selects the cheapest. + +To run it, see [RUNNING.md](RUNNING.md). + +## The page + +- **Examples**: one tab per entry of `examples.json` (#509 Examples 1, 3a + and 3b). `#example3b` in the URL opens that example. +- **Workload queries** with their accuracy, latency and recurrence, and a + line that counts the candidates at each stage. +- **Stage 3 · plans by cost**: every candidate the document shows. First the + selected plan, then the other valid ones cheapest first, then the + rejected ones with their reasons (or "not judged" when plan selection + failed with an error), then the Stage 2 pruned ones and the + Stage 1 candidates that did not compose, each with its reason. The header + says how many candidates Stage 1 enumerated, how many the document shows + when it caps them, and why Stage 1 or plan selection failed when it did. + Clicking a row shows it in the lanes. +- **Three lanes**, stacked top to bottom so each is as wide as the page: + Stage 0, the chosen Stage 1 candidate, and its Stage 2 candidate + with each node's timing and Stage 3 cost (`× n` when a node that is not + materialized is computed once per reader). Each lane is the whole + workload's DAG, so a node shared by several queries appears once. Nodes + are data sources, relational operators or summary operators; summary + builds print their configuration (for example `CmsWithHeap · depth 7 · + heap 100 · width 272`) and whether there is one per group, one per + series, or one shared instance. A standalone scalar query (`time()`, + `scalar(v)`, `1 + 2`) is a dashed `Scalar` node over the nodes it reads. + Query roots have a thick border. +- **Details**: click a node for its operator, timing, materialization, + output schema, guarantee and Stage 3 cost; click an edge for its schema + and data state. + +Other documents open with **Open stage document…**, by dropping a file on +the page, or with `?doc=` for a file served next to `index.html`. + +## Query editor + +With the local server running, **Query editor** plans SQL and PromQL +queries with one ε for every query. SQL queries read the tables declared in +the editor (one column per line, `name TYPE [NOT NULL]`, and an optional +time column). The server runs `stage_pipeline` with `--sql`, `--promql`, +`--name` and `--table` and the page shows the result. + +## Document format + +`stage_pipeline` writes: ```json { - "decision": { - "id": 7, - "strategy": "ASAPStrategies", - "rationale": "count realizes as a Cms sketch", - "rank": 0, - "cost": 1.14001088, - "role": "replacement_root", - "baseline_cost": { "value": 104.0032, "unit": "CostUnits", "source": "Modeled", "model_version": "analytical-cost-v1+example-calibration-v1", "evidence_version": "example-evidence-v1" }, - "selected_cost": { "value": 1.14001088, "unit": "CostUnits", "source": "Modeled", "baseline": {"kind": "PreAsapRecomputation"}, "delta": 102.86318912, "benefit_ratio": 0.9890386941940248 }, - "benefit": { "value": 102.86318912, "unit": "CostUnits", "source": "Modeled", "baseline": {"kind": "PreAsapRecomputation"}, "benefit_ratio": 0.9890386941940248 } + "format": "asap-stage-pipeline/v1", + "workload": { "queries": [{ "id": "q1", "language": "promql", "text": "...", + "requirements": { "accuracy": "exact", "repeat_interval_ms": 10000 } }] }, + "stage0_query_language_frontends": { "dag": "" }, + "stage1_logical_asap_optimization": { + "combinations": 9, "capped": false, + "candidates": [{ "id": "L1", "display_name": "...", "dag": "" }, + { "id": "L2", "display_name": "...", "error": "..." }] + }, + "stage2_physical_asap_optimization": { + "candidates": [{ "id": "P1", "from_logical": "L1", "display_name": "...", "dag": "" }], + "pruned": [{ "from_logical": "L3", "display_name": "...", "reason": "..." }] + }, + "stage3_plan_selection": { + "costs": { "P1": { "total": 7.9, "unit": "cost_per_second", "source": "...", + "per_node": { "": { "cost": 2.3, "multiplier": 1, "detail": "..." } } } }, + "selected": "P1", + "rejected": [{ "id": "P2", "valid": true, "reason": "..." }] } } ``` -The viewer reads this explicit metadata. It never guesses a strategy or -workload-sharing identity from a node label, hash, or client-side signature. -The exporter assigns `workload_node_id`; union rendering reads that mapping -directly. - -Node boxes use concrete IR fields: aggregate measures/grouping, sort keys, -filter predicates, projections, sources, summary families, and evaluation -queries. A node's `kind` is the operator variant name (`Operator::kind_name`): -a `NonASAPOp` such as `Aggregate` or `Values`, or an `ASAPOp` such as -`SummaryAgg` or `EvaluatePopulation`. `node-style.js` maps each kind to a color -category. Scalar expressions are not nodes; an operator a scalar expression -reads (`scalar(v)`, `EXISTS (subquery)`) is a child node, shown in `detail` -as `{"scalar_ref": }`. Schemas list their entries under `fields`. Category icons are deliberately omitted so they cannot be confused -with IR text. - -### Cost/benefit annotations (issue #286) - -`decision.baseline_cost` / `.selected_cost` / `.benefit` are structured -[`CostAnnotation`](../../crates/types/src/cost.rs)s: `value` + `unit` + -`source` (`Modeled` / `Measured` / `Unavailable`), optionally `baseline` + -`delta` + `benefit_ratio`, and `model_version`/`evidence_version`/ -`benchmark_id`/`inputs` for provenance. `model_version` identifies the -analytical formulas and calibration; `evidence_version` independently -identifies the immutable catalog/runtime generation. A missing `value` -(`source: "Unavailable"`) always renders as -**Not estimated** — the viewer never fabricates a number. A complete physical -planner export keeps CPU operations, peak memory, scan bytes, coefficients, -and workload statistics in `inputs`. Without complete physical evidence, the -annotation is `Unavailable`; structural node counts are never substituted, -including under `--default-cost`, where they rank the candidates and are then -discarded. -See the [analytical model design](../../docs/design_docs/asap-aware-mapping/analytical-resource-cost.md). - - -The checked-in viewer fixture makes its illustrative comparison reproducible. -It models 100 evaluations of 100 million 64-byte rows with 100,000 groups. -The raw path charges one scan plus three hash/key/accumulator operations per -row, so CPU is `100 × 100,000,000 × 4 = 40 billion` operations; it reads -`100 × 6.4 GB = 640 GB` and retains -`100,000 × (8-byte key + 8-byte accumulator + 16-byte hash metadata) = 3.2 MB`. -One incrementally built depth-5 CMS charges -`100,000,000 × 5 = 500 million` counter updates, reads the 6.4 GB source once, -and retains `272 × 5 × 8 = 10,880` bytes. With coefficients `1e-9` per CPU -operation, `1e-10` per scan byte, and `1e-9` per peak-memory byte, the displayed totals are -`104.0032` and `1.14001088` cost units. These are explicit fixture assumptions, -not statistics inferred by the viewer. - -The same three fields also appear on `TargetReplacement` -(replacement-region baseline/selected/benefit), `NamedDAG.workload_cost` / -`WorkloadDAG.workload_cost` (whole selected-workload cost/benefit, shared -decisions counted once via `decision.id` dedup). `ExportDAG.edge_annotations` -is reserved for a higher layer that has physical evidence for a particular -edge; DAG sharing alone never creates an edge cost. The sidebar shows the full breakdown -(value, unit, provenance, baseline, ratio, inputs) on node/edge click and in -the workload-scope summary; a post-ASAP node with a costed decision also -gets a concise on-DAG `▼NN%`/`▲NN%` badge next to its label. - -All of this is additive and optional: an export with none of these fields -(anything produced before issue #286) renders exactly as before. +- A flat logical DAG lists its nodes in id order; an operator names its + inputs by node id. `roots` has one root per query: `{"Operator": id}`, or + `{"Scalar": expr}` for a standalone scalar query. +- A `PhysicalASAPDAG` has node ids, an edge list, operator roots in `roots`, + and standalone scalar queries in `scalar_roots` as `[query position, + expr]`. +- When Pass 1 fails, Stage 1 has `error` and no candidates. When selection + fails, `selected` is null, with the rejections or with `error`. + +The viewer checks the document before showing it: one root per query, node, +edge and root references, `scalar_roots` positions, `from_logical`, and the Stage 3 ids, costs and +`per_node` keys. If a check fails, it shows the problems instead. + +## Files + +- `index.html`, `app.js`: the page. +- `stages.js`: document checks, the candidate list, lane elements and node + labels; no DOM. +- `node-style.js`: the operator-kind table (`KIND_CATEGORY_JSON`, checked + against the IR by `crates/devtools/tests/viewer_contract.rs`) and the + node groups. +- `editor.js`: the query editor. +- `server.py`: serves the page, writes missing example documents into + `out/` (git-ignored), and plans editor queries. +- `examples.json`: the example tabs. `examples/planner-layering-example1.json` + is the one committed document: `crates/devtools/tests/stage_pipeline.rs` + checks that it is current. +- `cytoscape.min.js`, `dagre.min.js`, `cytoscape-dagre.js`: vendored, so the + page works offline. ## Tests -```sh -python3 -m unittest discover -s tools/dag-viewer -p test_render.py -cargo test -p asap-devtools --bin dag_export +From `tools/dag-viewer`: + +```bash +python3 -m unittest test_viewer test_server +``` + +The JavaScript runs in V8 through `py_mini_racer` (`pip install +py-mini-racer==0.6.0`) against a stub DOM, so no browser is needed; without +it those tests are skipped. The scalar-query and `/api/plan` tests need a +built `stage_pipeline` (`cargo build -p asap-devtools --bin +stage_pipeline`). The Rust side: + +```bash +cargo test -p asap-devtools --test viewer_contract --test stage_pipeline ``` diff --git a/tools/dag-viewer/app.js b/tools/dag-viewer/app.js new file mode 100644 index 000000000..f1feb89d0 --- /dev/null +++ b/tools/dag-viewer/app.js @@ -0,0 +1,294 @@ +// ASAPPlanner Stage Viewer: an asap-stage-pipeline/v1 document as a Stage 3 +// candidate list beside three DAG lanes stacked top to bottom (Stage 0, +// then the Stage 1 candidate, then its Stage 2 candidate), details below. +// Each lane shows the whole workload. Document checks, the candidate list +// and node labels live in stages.js (tested); node-style.js groups operator +// kinds. +(function () { + if (window.cytoscapeDagre) cytoscape.use(window.cytoscapeDagre); + const $ = (id) => document.getElementById(id); + const esc = (s) => String(s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c])); + const tok = (name) => getComputedStyle(document.documentElement).getPropertyValue(name).trim(); + + let doc, rows, queryIds, logicalById, physicalById; + let current = { logical: null, physical: null }; + const cys = [null, null, null]; + const laneName = ['Stage 0 · query-language frontends', 'Stage 1 · logical ASAP optimization', 'Stage 2 · physical ASAP optimization']; + + function style() { + return [ + { selector: 'node', style: { + shape: 'round-rectangle', label: 'data(label)', 'text-wrap': 'wrap', 'text-valign': 'center', 'text-halign': 'center', + 'font-family': tok('--font-mono') || 'monospace', 'font-size': 10, color: tok('--fg'), + width: 'label', height: 'label', padding: '9px', 'border-width': 1.5, 'text-max-width': 240 } }, + { selector: 'node[group = "source"]', style: { 'background-color': tok('--cat-source'), 'border-color': tok('--cat-source-line') } }, + { selector: 'node[group = "rel"]', style: { 'background-color': tok('--cat-rel'), 'border-color': tok('--cat-rel-line') } }, + { selector: 'node[group = "summary"]', style: { 'background-color': tok('--cat-summary'), 'border-color': tok('--cat-summary-line') } }, + { selector: 'node[group = "scalar"]', style: { 'background-color': tok('--cat-scalar'), 'border-color': tok('--cat-scalar-line'), 'border-style': 'dashed' } }, + { selector: 'node.root', style: { 'border-width': 3.5, 'border-color': tok('--accent') } }, + { selector: 'node:selected', style: { 'overlay-color': tok('--accent'), 'overlay-opacity': 0.14, 'overlay-padding': 5 } }, + { selector: 'edge', style: { width: 1.6, 'line-color': tok('--edge'), 'target-arrow-color': tok('--edge'), 'target-arrow-shape': 'triangle', 'curve-style': 'bezier', 'arrow-scale': 0.9 } }, + { selector: 'edge:selected', style: { 'line-color': tok('--accent'), 'target-arrow-color': tok('--accent'), width: 2.6 } }, + ]; + } + + function clearLane(i, text) { + if (cys[i]) { cys[i].destroy(); cys[i] = null; } + $(`lane${i}-meta`).textContent = text; + } + + function render(i, dag, physical, costPerNode) { + if (cys[i]) cys[i].destroy(); + const elements = stageLaneElements(dag, { physical, costPerNode, queryIds }) + .map((el) => ({ data: el.data, classes: [el.classes, el.data.rootFor && el.data.rootFor.length ? 'root' : ''].join(' ').trim() })); + const cy = cytoscape({ + container: $('cy' + i), elements, style: style(), + layout: { name: window.cytoscapeDagre ? 'dagre' : 'breadthfirst', rankDir: 'BT', nodeSep: 18, rankSep: 34, padding: 14, directed: true }, + wheelSensitivity: 0.25, minZoom: 0.2, maxZoom: 2.5, boxSelectionEnabled: false, + }); + cy.on('tap', 'node', (e) => showNode(e.target.data(), i)); + cy.on('tap', 'edge', (e) => showEdge(e.target.data(), i)); + cys[i] = cy; + } + + const fmtCost = (x) => (Math.abs(x) >= 100 ? x.toFixed(1) : String(Number(x.toPrecision(3)))); + const kv = (items) => `
${items.map(([k, v]) => `
${esc(k)}
${esc(v)}
`).join('')}
`; + + function schemaTable(schema) { + if (!schema || !Array.isArray(schema.fields)) return ''; + const fields = schema.fields.map((f) => `${esc(f.name)}${esc(compactWire(f.dtype))}${f.nullable ? 'yes' : 'no'}`).join(''); + return `
output schema
${fields}
fieldtypenullable
`; + } + + function showNode(d, lane) { + const n = d.node; + const items = [['lane', laneName[lane]], ['operator', d.kind], ['node id', d.nodeId]]; + if (d.kind === 'Scalar') items.push(['expression', stageScalarText(n.Scalar)]); + const [, body] = d.kind === 'Scalar' ? [null, {}] : stageOperatorParts(n.payload || n.operator); + if (d.kind === 'SummaryAgg') { + items.push(['summary parameters', summaryFamilyText(body.family)]); + items.push(['instances', summaryInstancesText(body.grouping, body.reduction)]); + } + if (d.rootFor && d.rootFor.length) items.push(['query root of', d.rootFor.join(', ')]); + if (d.timing !== undefined) items.push(['runs at', formatTiming(d.timing)]); + if (n.materialization) items.push(['materialization', compactWire(n.materialization)]); + if (n.output_state && n.output_state.primitive) items.push(['output primitive', compactWire(n.output_state.primitive)]); + if (d.cost) { + const value = typeof d.cost.cost === 'number' + ? `${Number(d.cost.cost.toPrecision(4))}${d.cost.multiplier === 1 || d.cost.multiplier === undefined ? '' : ` × ${d.cost.multiplier}`}` + : 'no number'; + items.push(['Stage 3 cost', `${value} · ${d.cost.detail || ''}`]); + } + if (d.kind !== 'Scalar') items.push(['guarantee', n.guarantee ? compactWire(n.guarantee) : 'none']); + $('details').innerHTML = `

${esc(d.kind)} node ${esc(d.nodeId)}

${kv(items)} + ${schemaTable(n.output_schema || n.schema)} +
Full node (JSON)
${esc(JSON.stringify(n, null, 2))}
`; + } + + function showEdge(d, lane) { + const [from, to] = [d.source.slice(1), d.target.slice(1)]; + const items = [['lane', laneName[lane]], ['from → to', `node ${from} → node ${d.target.startsWith('s') ? `scalar root of query #${Number(to) + 1}` : to}`]]; + const e = d.edge; + if (e) { + items.push(['role', compactWire(e.role)], ['grouping', compactWire(e.grouping)]); + if (e.data_state) items.push(['data state', compactWire(e.data_state)]); + if (e.window) items.push(['window', compactWire(e.window)]); + } + $('details').innerHTML = `

Edge ${esc(from)} → ${esc(to)}

${kv(items)} + ${e ? schemaTable(e.intermediate_schema) : ''}`; + } + + function statusChip(status) { + if (status === 'selected') return '✓ selected'; + if (status === 'costlier') return 'valid · costlier'; + if (status === 'rejected') return '✗ invalid'; + if (status === 'not judged') return 'not judged'; + return `${esc(status)}`; + } + + function rowKey(row) { return `${row.status === 'pruned' || row.status === 'composition error' ? 'L' : 'P'}:${row.id}`; } + + function renderRanking() { + const pressed = current.physical ? `P:${current.physical}` : `L:${current.logical}`; + $('rank').innerHTML = rows.map((r) => `
  • `).join(''); + $('rank').querySelectorAll('button').forEach((b) => b.addEventListener('click', () => { + const [kind, id] = [b.dataset.key.slice(0, 1), b.dataset.key.slice(2)]; + if (kind === 'P') selectPhysical(id); + else selectLogical(id); + })); + } + + // Choose Stage 1 candidate `id`: show its physical plan when it has one; + // a pruned or uncomposed candidate has none, so Stage 2 is cleared. + function selectLogical(id) { + const physical = doc.stage2_physical_asap_optimization.candidates.find((p) => p.from_logical === id); + if (physical) { selectPhysical(physical.id); return; } + showLogical(id); + current.physical = null; + $('pick2').value = ''; + clearLane(2, 'no physical plan for this Stage 1 candidate'); + renderRanking(); + } + + // Draw Stage 1 candidate `id` in lane 1. + function showLogical(id) { + current.logical = id; + $('pick1').value = id; + const c = logicalById.get(id); + if (c.dag) { + render(1, c.dag, false, null); + const physicalFor = doc.stage2_physical_asap_optimization.candidates.filter((p) => p.from_logical === id).map((p) => p.id); + const pruned = (doc.stage2_physical_asap_optimization.pruned || []).find((p) => p.from_logical === id); + $('lane1-meta').innerHTML = `${esc(c.display_name)} · ${c.dag.nodes.length} nodes · ` + + (pruned ? `pruned by Stage 2: ${esc(pruned.reason)}` : `physical plan ${physicalFor.map((p) => `${esc(p)}`).join(', ') || 'none'}`); + } else { + clearLane(1, ''); + $('lane1-meta').innerHTML = `${esc(c.display_name)} · composition error: ${esc(c.error)}`; + } + } + + function selectPhysical(id) { + current.physical = id; + $('pick2').value = id; + const c = physicalById.get(id); + const selection = doc.stage3_plan_selection; + const cost = selection.costs[id]; + render(2, c.dag, true, cost ? cost.per_node : null); + const row = rows.find((r) => rowKey(r) === `P:${id}`); + const priced = rows.filter((r) => r.rank !== null).length; + $('lane2-meta').innerHTML = `${esc(c.display_name)} · from ${esc(c.from_logical)} · ` + + (cost ? `total ${fmtCost(cost.total)} ${esc(cost.unit.replace(/_/g, ' '))} · rank ${row.rank} of ${priced}` : 'not priced') + + ` · ${statusChip(row.status)}`; + if (c.from_logical !== current.logical) showLogical(c.from_logical); + renderRanking(); + } + + function restyle() { cys.forEach((cy) => cy && cy.style(style())); } + + const HINT = '

    Select a node to see its operator, output schema, timing and Stage 3 cost; select an edge to see the schema and data state it carries.

    '; + + // Show one stage document; `source` names it, `story` explains it. + function showDocument(data, source, story) { + const errors = validateStagePipeline(data); + if (errors.length) throw new Error(errors.slice(0, 3).join('; ')); + doc = data; + current = { logical: null, physical: null }; + $('details').innerHTML = HINT; + $('docName').textContent = source || ''; + $('story').textContent = story || ''; + $('story').hidden = !story; + queryIds = doc.workload.queries.map((q) => q.id); + const logical = doc.stage1_logical_asap_optimization; + const physical = doc.stage2_physical_asap_optimization; + const selection = doc.stage3_plan_selection; + logicalById = new Map(logical.candidates.map((c) => [c.id, c])); + physicalById = new Map(physical.candidates.map((c) => [c.id, c])); + rows = stageCandidateRows(doc); + + $('queries').innerHTML = doc.workload.queries.map((q) => { + const r = q.requirements || {}; + const acc = r.accuracy === 'exact' ? 'exact' : r.accuracy ? `ε=${r.accuracy.epsilon}${r.accuracy.delta !== undefined ? `, δ=${r.accuracy.delta}` : ''}` : ''; + const req = [acc && `accuracy ${acc}`, r.latency_ms && `latency ≤ ${r.latency_ms} ms`, r.repeat_interval_ms && `every ${r.repeat_interval_ms / 1000} s`].filter(Boolean).join(' · '); + return `
    ${esc(q.id)} · ${esc(q.language)}${esc(q.text)}${req ? `${esc(req)}` : ''}
    `; + }).join(''); + const count = (status) => rows.filter((r) => r.status === status).length; + $('counts').innerHTML = `Candidates per stage: 1 logical DAG → ${logical.combinations} logical ASAP` + + (logical.capped ? ` (${logical.candidates.length} shown)` : '') + + ` → ${physicalById.size} physical` + + (selection.selected ? ` → 1 selected (${count('rejected')} invalid, ${count('costlier')} valid but costlier)` : ' → none selected'); + $('rank-meta').textContent = stageCandidateHeader(doc); + const sel = selection.selected ? selection.costs[selection.selected] : null; + $('cost-unit').textContent = sel ? sel.unit.replace(/_/g, ' ') : ''; + + $('pick1').innerHTML = logical.candidates.map((c) => ``).join(''); + $('pick2').innerHTML = rows.filter((r) => rowKey(r).startsWith('P')) + .map((r) => ``).join(''); + + render(0, doc.stage0_query_language_frontends.dag, false, null); + $('lane0-meta').innerHTML = `${doc.stage0_query_language_frontends.dag.nodes.length} nodes · roots for ${queryIds.map((q) => `${esc(q)}`).join(', ')}`; + // The selected plan is the first row when there is one. + const first = rows[0]; + if (first && rowKey(first).startsWith('P')) selectPhysical(first.id); + else if (first) selectLogical(first.logical); + else { + clearLane(1, 'no candidates'); + clearLane(2, 'no candidates'); + renderRanking(); + } + } + + function showError(err) { + $('queries').innerHTML = `Could not load the planner output: ${esc(err.message)}`; + } + + // Loads are numbered so a slow earlier fetch cannot replace a later one. + let loading = 0; + function loadUrl(url, source, story) { + const ticket = ++loading; + $('queries').innerHTML = 'Loading planner output…'; + return fetch(url).then((r) => { if (!r.ok) throw new Error(`${url}: HTTP ${r.status}`); return r.json(); }) + .then((data) => { if (ticket === loading) showDocument(data, source, story); }) + .catch((err) => { if (ticket === loading) showError(err); }); + } + + let examples = []; + function pressTab(id) { + $('tabs').querySelectorAll('button').forEach((b) => b.setAttribute('aria-pressed', String(b.dataset.id === id))); + } + function loadExample(example) { + pressTab(example.id); + try { history.replaceState(null, '', '#' + example.id); } catch (e) { /* the hash is a convenience */ } + loadUrl(example.file, example.file, example.story); + } + + // Documents from outside the example list (a file, the editor) clear the + // tab. Returns whether the document was shown. + function showExternal(data, source) { + ++loading; + pressTab(null); + try { history.replaceState(null, '', location.pathname + location.search); } catch (e) { /* ignore */ } + try { + showDocument(data, source, ''); + return true; + } catch (err) { + showError(err); + return false; + } + } + + function readFile(file) { + file.text().then((text) => showExternal(JSON.parse(text), file.name)).catch(showError); + } + $('openFile').addEventListener('click', () => $('fileInput').click()); + $('fileInput').addEventListener('change', (e) => { if (e.target.files[0]) readFile(e.target.files[0]); e.target.value = ''; }); + document.addEventListener('dragover', (e) => { e.preventDefault(); document.body.classList.add('drop-active'); }); + document.addEventListener('dragleave', (e) => { if (!e.relatedTarget) document.body.classList.remove('drop-active'); }); + document.addEventListener('drop', (e) => { + e.preventDefault(); + document.body.classList.remove('drop-active'); + if (e.dataTransfer.files[0]) readFile(e.dataTransfer.files[0]); + }); + + $('pick1').addEventListener('change', (e) => selectLogical(e.target.value)); + $('pick2').addEventListener('change', (e) => selectPhysical(e.target.value)); + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', restyle); + new MutationObserver(restyle).observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] }); + $('details').innerHTML = HINT; + + window.StageViewer = { showDocument: showExternal }; + + // `?doc=` opens one document; otherwise the examples listed in + // examples.json, starting from `#` or the first. + const requested = new URLSearchParams(location.search).get('doc'); + fetch('examples.json').then((r) => (r.ok ? r.json() : [])).catch(() => []).then((list) => { + examples = Array.isArray(list) ? list : []; + $('tabs').innerHTML = examples.map((x) => ``).join(''); + $('tabs').hidden = examples.length === 0; + $('tabs').querySelectorAll('button').forEach((b) => b.addEventListener('click', () => loadExample(examples.find((x) => x.id === b.dataset.id)))); + if (requested) loadUrl(requested, requested, ''); + else if (examples.length) loadExample(examples.find((x) => '#' + x.id === location.hash) || examples[0]); + }); +})(); diff --git a/tools/dag-viewer/cost-benefit-annotations.png b/tools/dag-viewer/cost-benefit-annotations.png deleted file mode 100644 index 265df5178..000000000 Binary files a/tools/dag-viewer/cost-benefit-annotations.png and /dev/null differ diff --git a/tools/dag-viewer/cost-benefit-positive-savings.png b/tools/dag-viewer/cost-benefit-positive-savings.png deleted file mode 100644 index 1b5d2f179..000000000 Binary files a/tools/dag-viewer/cost-benefit-positive-savings.png and /dev/null differ diff --git a/tools/dag-viewer/dag.example.json b/tools/dag-viewer/dag.example.json deleted file mode 100644 index a60ebadfc..000000000 --- a/tools/dag-viewer/dag.example.json +++ /dev/null @@ -1,27417 +0,0 @@ -{ - "format": "asap-stage-pipeline/v1", - "stage0_query_language_frontends": { - "dag": { - "nodes": [ - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 0, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "kind": "count" - } - ], - "output_names": [ - "count(Int64(1))" - ], - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 1, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 3, - "filters": [], - "having": null, - "measures": [ - { - "col": 3, - "kind": "avg" - } - ], - "output_names": [ - "avg(metrics.latency)" - ], - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 4, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 6, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 7, - "filters": [], - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 8, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 5, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 10, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 11 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 12, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "kind": "count" - } - ], - "output_names": [ - "count(Int64(1))" - ], - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 13, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 15, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 16, - "filters": [], - "having": null, - "measures": [ - { - "kind": "rate" - } - ], - "output_names": [ - "" - ], - "reduction": "PerEntity" - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 17, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 10, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - } - ], - "roots": [ - { - "Operator": 2 - }, - { - "Operator": 5 - }, - { - "Operator": 9 - }, - { - "Operator": 14 - }, - { - "Operator": 18 - } - ] - } - }, - "stage1_logical_asap_optimization": { - "candidates": [ - { - "dag": { - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 17, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 5, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 19, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 20 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 21, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 22 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 23, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 24, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 26, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 27, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 28 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 29, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 10, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - } - ], - "roots": [ - { - "Operator": 4 - }, - { - "Operator": 13 - }, - { - "Operator": 18 - }, - { - "Operator": 25 - }, - { - "Operator": 30 - } - ] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 exact (Count acc) · Q5 exact (Rate acc)", - "id": "L1" - }, - { - "dag": { - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 17, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 5, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 19, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 20 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 21, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 22 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 23, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 24, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 26, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 27, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 28 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 29, - "family": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 5, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 5, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 30 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 31, - "cols": [ - { - "alias": "topk_10", - "expr": { - "Column": 0 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - } - ], - "roots": [ - { - "Operator": 4 - }, - { - "Operator": 13 - }, - { - "Operator": 18 - }, - { - "Operator": 25 - }, - { - "Operator": 32 - } - ] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 exact (Count acc) · Q5 CMS+heap (Rate acc)", - "id": "L2" - }, - { - "dag": { - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 17, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 5, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 19, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 20 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 21, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 22 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 23, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 24, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 26, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 27, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 28 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 29, - "family": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 83, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 83, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 30 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 31, - "cols": [ - { - "alias": "topk_10", - "expr": { - "Column": 0 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - } - ], - "roots": [ - { - "Operator": 4 - }, - { - "Operator": 13 - }, - { - "Operator": 18 - }, - { - "Operator": 25 - }, - { - "Operator": 32 - } - ] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 exact (Count acc) · Q5 CountSketch+heap (Rate acc)", - "id": "L3" - }, - { - "dag": { - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 17, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 5, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 19, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 20 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 21, - "family": { - "Sketch": [ - { - "algorithm": "Cms", - "category": "Frequency", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight": { - "Constant": 1.0 - }, - "weight_domain": { - "kind": "non_negative", - "proof": "unit_count" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Sketch": [ - { - "algorithm": "Cms", - "category": "Frequency", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_evaluation", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryEstimate": { - "query": { - "PointCount": { - "key": "SampleValue", - "value": null - } - }, - "summary_input": 22 - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_evaluation", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 23, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_evaluation", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 24, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "relation", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 26, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - }, - "result_kind": "range_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 27, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 28 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 29, - "filters": [], - "having": null, - "measures": [ - { - "accuracy": { - "Epsilon": 0.01 - }, - "k": 10, - "kind": "top_k" - } - ], - "output_names": [], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - } - ], - "roots": [ - { - "Operator": 4 - }, - { - "Operator": 13 - }, - { - "Operator": 18 - }, - { - "Operator": 25 - }, - { - "Operator": 30 - } - ] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 Cms · Q5 exact (Rate acc)", - "id": "L4" - } - ], - "capped": true, - "combinations": 144 - }, - "stage2_physical_asap_optimization": { - "candidates": [ - { - "dag": { - "edges": [ - { - "consumer": 1, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 1, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 3, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 4, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 3, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 6, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 7, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 6, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 8, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 9, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 8, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 7, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 9, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 11, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 10, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 12, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 11, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 13, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 12, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 15, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 14, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 16, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 15, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 17, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 16, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 18, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 17, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 19, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 18, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 20, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 19, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 21, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 22, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 24, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 23, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 25, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 24, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 26, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 25, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 27, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 26, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 29, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 28, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 30, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 29, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 31, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 30, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 32, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 31, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 33, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 32, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 34, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 33, - "role": "Input", - "window": "NotApplicable" - } - ], - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 0, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 1, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 2, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 3, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 4, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 5, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 6, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 7, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - } - }, - { - "guarantee": null, - "id": 8, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 9, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 10, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 11, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 12, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 13, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 14, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 15, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 16, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 17, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 18, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Sort": { - "child": 17, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 19, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Limit": { - "child": 18, - "n": 5, - "offset": 0, - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 20, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 19, - "cols": [ - { - "alias": "topk_5", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 21, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 22, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 23, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 21, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 22 - } - } - } - }, - { - "guarantee": null, - "id": 24, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 23, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 25, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 24 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 26, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 25, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 27, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 26, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 28, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 29, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 28, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 30, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 29, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 31, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 30 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 32, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Sort": { - "child": 31, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 33, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Limit": { - "child": 32, - "n": 10, - "offset": 0, - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 34, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 33, - "cols": [ - { - "alias": "topk_10", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - } - ], - "roots": [ - 4, - 13, - 20, - 27, - 34 - ], - "scalar_roots": [] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 exact (Count acc) · Q5 exact (Rate acc)", - "from_logical": "L1", - "id": "P1" - }, - { - "dag": { - "edges": [ - { - "consumer": 1, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 1, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 3, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 4, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 3, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 6, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 7, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 6, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 8, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 9, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 8, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 7, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 9, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 11, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 10, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 12, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 11, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 13, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 12, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 15, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 14, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 16, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 15, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 17, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 16, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 18, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 17, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 19, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 18, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 20, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 19, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 21, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 22, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 24, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 23, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 25, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 24, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 26, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 25, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 27, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 26, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 29, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 28, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 30, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 29, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 31, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 30, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 32, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 31, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 33, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 5, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 32, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 34, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 33, - "role": "Input", - "window": "NotApplicable" - } - ], - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 0, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 1, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 2, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 3, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 4, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 5, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 6, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 7, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - } - }, - { - "guarantee": null, - "id": 8, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 9, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 10, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 11, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 12, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 13, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 14, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 15, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 16, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 17, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 18, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Sort": { - "child": 17, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 19, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Limit": { - "child": 18, - "n": 5, - "offset": 0, - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 20, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 19, - "cols": [ - { - "alias": "topk_5", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 21, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 22, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 23, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 21, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 22 - } - } - } - }, - { - "guarantee": null, - "id": 24, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 23, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 25, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 24 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 26, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 25, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 27, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 26, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 28, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 29, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 28, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 30, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 29, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 31, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 30 - } - } - } - }, - { - "guarantee": null, - "id": 32, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 5, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 31, - "family": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 5, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - } - }, - { - "guarantee": null, - "id": 33, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 32 - } - } - } - }, - { - "guarantee": null, - "id": 34, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 33, - "cols": [ - { - "alias": "topk_10", - "expr": { - "Column": 0 - } - } - ], - "qualifier": null - } - } - } - } - ], - "roots": [ - 4, - 13, - 20, - 27, - 34 - ], - "scalar_roots": [] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 exact (Count acc) · Q5 CMS+heap (Rate acc)", - "from_logical": "L2", - "id": "P2" - }, - { - "dag": { - "edges": [ - { - "consumer": 1, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 1, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 3, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 4, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 3, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 6, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 7, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 6, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 8, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 9, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 8, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 7, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 9, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 11, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 10, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 12, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 11, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 13, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 12, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 15, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 14, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 16, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 15, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 17, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 16, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 18, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 17, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 19, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 18, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 20, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 19, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 21, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 22, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 24, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 23, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 25, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 24, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 26, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 25, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 27, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 26, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 29, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 28, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 30, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 29, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 31, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 30, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 32, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 31, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 33, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 83, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 32, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 34, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 33, - "role": "Input", - "window": "NotApplicable" - } - ], - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 0, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 1, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 2, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 3, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 4, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 5, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 6, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 7, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - } - }, - { - "guarantee": null, - "id": 8, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 9, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 10, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 11, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 12, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 13, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 14, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 15, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 16, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 17, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 18, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Sort": { - "child": 17, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 19, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Limit": { - "child": 18, - "n": 5, - "offset": 0, - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 20, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 19, - "cols": [ - { - "alias": "topk_5", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 21, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 22, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 23, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 21, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 22 - } - } - } - }, - { - "guarantee": null, - "id": 24, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 23, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 25, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 24 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 26, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 25, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 27, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 26, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 28, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 29, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 28, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 30, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 29, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 31, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 30 - } - } - } - }, - { - "guarantee": null, - "id": 32, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 83, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 31, - "family": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 83, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - } - }, - { - "guarantee": null, - "id": 33, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 32 - } - } - } - }, - { - "guarantee": null, - "id": 34, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 33, - "cols": [ - { - "alias": "topk_10", - "expr": { - "Column": 0 - } - } - ], - "qualifier": null - } - } - } - } - ], - "roots": [ - 4, - 13, - 20, - 27, - 34 - ], - "scalar_roots": [] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 exact (Count acc) · Q5 CountSketch+heap (Rate acc)", - "from_logical": "L3", - "id": "P3" - }, - { - "dag": { - "edges": [ - { - "consumer": 1, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 1, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 3, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 4, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 3, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 6, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 7, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 6, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 8, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 9, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 8, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 7, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 9, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 11, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 10, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 12, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 11, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 13, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 12, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 15, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 14, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 16, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 15, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 17, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 16, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 18, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 17, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 19, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 18, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 20, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 19, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 21, - "role": "Left", - "window": "NotApplicable" - }, - { - "consumer": 23, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 22, - "role": "Right", - "window": "NotApplicable" - }, - { - "consumer": 24, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 23, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 25, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Sketch": [ - { - "algorithm": "Cms", - "category": "Frequency", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 24, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 26, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 25, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 27, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 26, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 29, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 28, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 30, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 29, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 31, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 30, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 32, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 31, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 33, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 32, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 34, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 33, - "role": "Input", - "window": "NotApplicable" - } - ], - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 0, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 1, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 0, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 2, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 1 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 3, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 2, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 4, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 3, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 5, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": null, - "id": 6, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 7, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - } - }, - { - "guarantee": null, - "id": 8, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Count", - "Count" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 9, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 10, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 7, - "pred": { - "BoolAnd": [ - { - "Compare": { - "left": { - "Column": 0 - }, - "op": "Eq", - "right": { - "Column": 2 - }, - "semantics": "sql" - } - } - ] - }, - "right": 9 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 11, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "col_1", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Arithmetic": { - "left": { - "Cast": { - "expr": { - "Column": 1 - }, - "to": "float64", - "try_cast": false - } - }, - "op": "Div", - "right": { - "Cast": { - "expr": { - "Column": 3 - }, - "to": "float64", - "try_cast": false - } - }, - "semantics": "sql" - } - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 12, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 11, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "avg(metrics.latency)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 13, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "avg(metrics.latency)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 12, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": null, - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 14, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 15, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 14, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 16, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 15, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 17, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 16 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 18, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Sort": { - "child": 17, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 19, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Limit": { - "child": 18, - "n": 5, - "offset": 0, - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 20, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "topk_5", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 19, - "cols": [ - { - "alias": "topk_5", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 21, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "metrics" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 22, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": null, - "unique_keys": [] - }, - "source": { - "Table": { - "table_ref": "hosts" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 23, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "latency", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "bytes", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "hosts" - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "region", - "nullable": false, - "table": "hosts" - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Join": { - "kind": "Inner", - "left": 21, - "pred": { - "Compare": { - "left": { - "Column": 1 - }, - "op": "Eq", - "right": { - "Column": 5 - }, - "semantics": "sql" - } - }, - "right": 22 - } - } - } - }, - { - "guarantee": null, - "id": 24, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Sketch": [ - { - "algorithm": "Cms", - "category": "Frequency", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 23, - "family": { - "Sketch": [ - { - "algorithm": "Cms", - "category": "Frequency", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Qualified": { - "name": "latency", - "table": "metrics" - } - } - }, - "weight": { - "Constant": 1.0 - }, - "weight_domain": { - "kind": "non_negative", - "proof": "unit_count" - } - }, - "reduction": { - "Reduce": [ - 1 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_evaluation", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - } - ] - }, - "id": 25, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": "metrics" - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryEstimate": { - "query": { - "PointCount": { - "key": "SampleValue", - "value": null - } - }, - "summary_input": 24 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_evaluation", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - } - ] - }, - "id": 26, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(Int64(1))", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 25, - "cols": [ - { - "alias": "service", - "expr": { - "Column": 0 - } - }, - { - "alias": "count(Int64(1))", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "constant", - "value": 0.009993683192864136 - }, - "failure_probability": { - "op": "constant", - "value": 0.006737946999085467 - }, - "metric": "frequency", - "provenance": [ - { - "algorithm": "Cms", - "contract": "count_min_l1_markov_v1", - "kind": "sketch_evaluation", - "params": { - "Cms": { - "depth": 5, - "width": 272 - } - }, - "query": "PointCount { key: SampleValue, value: None }" - } - ] - }, - "id": 27, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "service", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "int64" - }, - "name": "count(*)", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 26, - "cols": [ - { - "alias": null, - "expr": { - "Column": 0 - } - }, - { - "alias": "count(*)", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 28, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 29, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 28, - "kind": "range", - "range": { - "nanos": 0, - "secs": 300 - } - } - } - } - }, - { - "guarantee": null, - "id": 30, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 29, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 31, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 30 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 32, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Sort": { - "child": 31, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 33, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Limit": { - "child": 32, - "n": 10, - "offset": 0, - "partition_by": [] - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 34, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "topk_10", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Project": { - "child": 33, - "cols": [ - { - "alias": "topk_10", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - } - } - ], - "roots": [ - 4, - 13, - 20, - 27, - 34 - ], - "scalar_roots": [] - }, - "display_name": "Q1 exact (Count acc) · Q2 exact (Sum/Count acc) · Q3 exact (Rate acc) · Q4 Cms · Q5 exact (Rate acc)", - "from_logical": "L4", - "id": "P4" - } - ], - "pruned": [] - }, - "stage3_plan_selection": { - "costs": { - "P1": { - "per_node": { - "0": { - "cost": 0.39599999999999996, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "1": { - "cost": 0.06, - "detail": "build exact Count accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "10": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "11": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "12": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "13": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "14": { - "cost": 1.26, - "detail": "scan 300000 samples", - "multiplier": 1 - }, - "15": { - "cost": 0.3, - "detail": "time range 300s: pass 300000 rows", - "multiplier": 1 - }, - "16": { - "cost": 0.3, - "detail": "build exact Rate accumulator into 1000 states: 300000 rows x depth 1", - "multiplier": 1 - }, - "17": { - "cost": 0.001, - "detail": "finalize 1000 accumulators", - "multiplier": 1 - }, - "18": { - "cost": 0.01, - "detail": "sort 1000 rows in 1 partitions", - "multiplier": 1 - }, - "19": { - "cost": 4.9999999999999996e-6, - "detail": "limit to 5 rows", - "multiplier": 1 - }, - "2": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - }, - "20": { - "cost": 4.9999999999999996e-6, - "detail": "operator: pass 5 rows", - "multiplier": 1 - }, - "21": { - "cost": 0.39599999999999996, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "22": { - "cost": 0.252, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "23": { - "cost": 0.06, - "detail": "operator: pass 60000 rows", - "multiplier": 1 - }, - "24": { - "cost": 0.06, - "detail": "build exact Count accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "25": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - }, - "26": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "27": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "28": { - "cost": 1.26, - "detail": "scan 300000 samples", - "multiplier": 1 - }, - "29": { - "cost": 0.3, - "detail": "time range 300s: pass 300000 rows", - "multiplier": 1 - }, - "3": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "30": { - "cost": 0.3, - "detail": "build exact Rate accumulator into 1000 states: 300000 rows x depth 1", - "multiplier": 1 - }, - "31": { - "cost": 0.001, - "detail": "finalize 1000 accumulators", - "multiplier": 1 - }, - "32": { - "cost": 0.01, - "detail": "sort 1000 rows in 1 partitions", - "multiplier": 1 - }, - "33": { - "cost": 9.999999999999999e-6, - "detail": "limit to 10 rows", - "multiplier": 1 - }, - "34": { - "cost": 9.999999999999999e-6, - "detail": "operator: pass 10 rows", - "multiplier": 1 - }, - "4": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "5": { - "cost": 0.39599999999999996, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "6": { - "cost": 0.06, - "detail": "build exact Sum accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "7": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - }, - "8": { - "cost": 0.06, - "detail": "build exact Count accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "9": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - } - }, - "source": "analytical-cost-v1 (illustrative statistics)", - "total": 5.483229999999999, - "unit": "cpu_ms_per_workload_evaluation" - }, - "P4": { - "per_node": { - "0": { - "cost": 0.39599999999999996, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "1": { - "cost": 0.06, - "detail": "build exact Count accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "10": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "11": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "12": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "13": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "14": { - "cost": 1.26, - "detail": "scan 300000 samples", - "multiplier": 1 - }, - "15": { - "cost": 0.3, - "detail": "time range 300s: pass 300000 rows", - "multiplier": 1 - }, - "16": { - "cost": 0.3, - "detail": "build exact Rate accumulator into 1000 states: 300000 rows x depth 1", - "multiplier": 1 - }, - "17": { - "cost": 0.001, - "detail": "finalize 1000 accumulators", - "multiplier": 1 - }, - "18": { - "cost": 0.01, - "detail": "sort 1000 rows in 1 partitions", - "multiplier": 1 - }, - "19": { - "cost": 4.9999999999999996e-6, - "detail": "limit to 5 rows", - "multiplier": 1 - }, - "2": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - }, - "20": { - "cost": 4.9999999999999996e-6, - "detail": "operator: pass 5 rows", - "multiplier": 1 - }, - "21": { - "cost": 0.39599999999999996, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "22": { - "cost": 0.252, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "23": { - "cost": 0.06, - "detail": "operator: pass 60000 rows", - "multiplier": 1 - }, - "24": { - "cost": 0.3, - "detail": "build Cms into 100 states: 60000 rows x depth 5", - "multiplier": 1 - }, - "25": { - "cost": 0.00009999999999999999, - "detail": "estimate 100 groups x 1", - "multiplier": 1 - }, - "26": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "27": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "28": { - "cost": 1.26, - "detail": "scan 300000 samples", - "multiplier": 1 - }, - "29": { - "cost": 0.3, - "detail": "time range 300s: pass 300000 rows", - "multiplier": 1 - }, - "3": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "30": { - "cost": 0.3, - "detail": "build exact Rate accumulator into 1000 states: 300000 rows x depth 1", - "multiplier": 1 - }, - "31": { - "cost": 0.001, - "detail": "finalize 1000 accumulators", - "multiplier": 1 - }, - "32": { - "cost": 0.01, - "detail": "sort 1000 rows in 1 partitions", - "multiplier": 1 - }, - "33": { - "cost": 9.999999999999999e-6, - "detail": "limit to 10 rows", - "multiplier": 1 - }, - "34": { - "cost": 9.999999999999999e-6, - "detail": "operator: pass 10 rows", - "multiplier": 1 - }, - "4": { - "cost": 0.00009999999999999999, - "detail": "operator: pass 100 rows", - "multiplier": 1 - }, - "5": { - "cost": 0.39599999999999996, - "detail": "scan 60000 samples", - "multiplier": 1 - }, - "6": { - "cost": 0.06, - "detail": "build exact Sum accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "7": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - }, - "8": { - "cost": 0.06, - "detail": "build exact Count accumulator into 100 states: 60000 rows x depth 1", - "multiplier": 1 - }, - "9": { - "cost": 0.00009999999999999999, - "detail": "finalize 100 accumulators", - "multiplier": 1 - } - }, - "source": "analytical-cost-v1 (illustrative statistics)", - "total": 5.723229999999998, - "unit": "cpu_ms_per_workload_evaluation" - } - }, - "rejected": [ - { - "id": "P2", - "reason": "q5: CmsWithHeap needs non-negative update weights, and these are not proven non-negative", - "valid": false - }, - { - "id": "P3", - "reason": "q5: the output has no guarantee, and the deployment has no evidence that it meets target Epsilon(0.01)", - "valid": false - }, - { - "id": "P4", - "reason": "costlier: 5.723 vs 5.483 cpu_ms_per_workload_evaluation", - "valid": true - } - ], - "selected": "P1" - }, - "workload": { - "queries": [ - { - "id": "count_by_service", - "language": "sql", - "requirements": { - "accuracy": { - "epsilon": 0.01 - } - }, - "text": "SELECT service, COUNT(*) FROM metrics GROUP BY service" - }, - { - "id": "avg_latency", - "language": "sql", - "requirements": { - "accuracy": { - "epsilon": 0.01 - } - }, - "text": "SELECT service, AVG(latency) FROM metrics GROUP BY service" - }, - { - "id": "q3", - "language": "promql", - "requirements": { - "accuracy": { - "epsilon": 0.01 - } - }, - "text": "topk(5, rate(http_requests_total[5m]))" - }, - { - "id": "q6", - "language": "sql", - "requirements": { - "accuracy": { - "epsilon": 0.01 - } - }, - "text": "SELECT metrics.service, COUNT(*) FROM metrics JOIN hosts ON metrics.service = hosts.service GROUP BY metrics.service" - }, - { - "id": "q4", - "language": "promql", - "requirements": { - "accuracy": { - "epsilon": 0.01 - } - }, - "text": "topk(10, rate(http_requests_total[5m]))" - } - ] - } -} diff --git a/tools/dag-viewer/editor.js b/tools/dag-viewer/editor.js new file mode 100644 index 000000000..2ee543559 --- /dev/null +++ b/tools/dag-viewer/editor.js @@ -0,0 +1,169 @@ +// Query editor: plans SQL and PromQL queries through the local server's +// /api/plan (server.py runs `stage_pipeline`) and shows the resulting stage +// document. SQL queries read the tables declared here. +(function () { + const $ = (id) => document.getElementById(id); + const escapeHtml = (s) => String(s).replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c])); + const plannerRows = $('plannerRows'); + const plannerStatus = $('plannerStatus'); + const schemaRows = $('schemaRows'); + + function addSchemaRow(schema = {}) { + const row = document.createElement('div'); + row.className = 'schemaRow'; + row.innerHTML = ` + + + + + `; + row.querySelector('.schemaRemove').addEventListener('click', () => { + row.remove(); + refreshSchemaSelectors(); + }); + row.querySelectorAll('input, textarea').forEach((input) => input.addEventListener('input', refreshSchemaSelectors)); + schemaRows.appendChild(row); + refreshSchemaSelectors(); + } + + function enabledSchemaNames() { + return Array.from(schemaRows.querySelectorAll('.schemaRow')) + .filter((row) => row.querySelector('.schemaInclude').checked) + .map((row) => row.querySelector('.schemaName').value.trim()) + .filter(Boolean); + } + + function refreshSchemaSelectors() { + const names = enabledSchemaNames(); + plannerRows.querySelectorAll('.plannerRow').forEach((row) => { + const container = row.querySelector('.plannerSchemas'); + const previous = new Set(Array.from(container.querySelectorAll('input:checked')).map((input) => input.value)); + const promql = row.querySelector('.plannerLanguage').value === 'promql'; + container.innerHTML = promql + ? 'Metric schema (inferred)' + : names.map((name) => ``).join(''); + }); + } + + function parseSchemaRow(row) { + const columns = row.querySelector('.schemaColumns').value.split(/[\n,]+/).map((raw) => raw.trim()).filter(Boolean).map((raw) => { + const compact = raw.match(/^([^:\s]+):([a-zA-Z0-9]+)(!)?$/); + if (compact) return { name: compact[1], type: compact[2], nullable: !compact[3] }; + const readable = raw.match(/^(\S+)\s+(\S+?)(?:\s+(NOT\s+NULL|NULL))?$/i); + if (!readable) throw new Error(`Invalid column ${raw}; use "name TYPE [NOT NULL]"`); + return { + name: readable[1], + type: readable[2], + nullable: !readable[3] || readable[3].toUpperCase() === 'NULL', + }; + }); + const timeName = row.querySelector('.schemaTimeIndex').value.trim(); + const timeIndex = timeName ? columns.findIndex((column) => column.name === timeName) : -1; + if (timeName && timeIndex < 0) throw new Error(`Time column ${timeName} is not in the column list`); + return { + name: row.querySelector('.schemaName').value.trim(), + columns, + ...(timeIndex >= 0 ? { time_index: timeIndex } : {}), + }; + } + + function addPlannerRow(query = {}) { + const row = document.createElement('div'); + row.className = 'plannerRow'; + row.innerHTML = ` + + + +
    + + `; + row.querySelector('.plannerLanguage').value = query.language || 'sql'; + row.querySelector('.plannerLanguage').addEventListener('change', refreshSchemaSelectors); + row.querySelector('.plannerRemove').addEventListener('click', () => row.remove()); + plannerRows.appendChild(row); + refreshSchemaSelectors(); + (query.schemas || (query.schema ? [query.schema] : [])).forEach((name) => { + const checkbox = Array.from(row.querySelectorAll('.plannerSchemas input')).find((input) => input.value === name); + if (checkbox) checkbox.checked = true; + }); + } + + $('editorToggle').addEventListener('click', () => { + const open = $('editor').hidden; + $('editor').hidden = !open; + $('editorToggle').setAttribute('aria-pressed', String(open)); + }); + $('plannerAdd').addEventListener('click', () => addPlannerRow({ text: '' })); + $('schemaAdd').addEventListener('click', () => addSchemaRow()); + $('plannerRun').addEventListener('click', async () => { + const rows = Array.from(plannerRows.querySelectorAll('.plannerRow')).filter((row) => row.querySelector('.plannerInclude').checked); + const queries = rows.map((row) => ({ + name: row.querySelector('.plannerName').value, + language: row.querySelector('.plannerLanguage').value, + schemas: Array.from(row.querySelectorAll('.plannerSchemas input:checked')).map((input) => input.value), + text: row.querySelector('.plannerText').value, + })); + plannerStatus.textContent = 'Running stage_pipeline (Stage 0 query-language frontends → Stage 3 plan selection)…'; + $('plannerRun').disabled = true; + let response = null; + try { + response = await fetch('/api/plan', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + queries, + schemas: Array.from(schemaRows.querySelectorAll('.schemaRow')) + .filter((row) => row.querySelector('.schemaInclude').checked) + .map(parseSchemaRow), + epsilon: Number($('plannerEpsilon').value), + }), + }); + const result = await response.json(); + if (!response.ok) throw new Error(result.error || `HTTP ${response.status}`); + const count = queries.length; + if (!window.StageViewer.showDocument(result, `editor · ${count} quer${count === 1 ? 'y' : 'ies'}`)) { + throw new Error('the viewer could not show the planner output (see above)'); + } + const selection = result.stage3_plan_selection; + const cost = selection.costs[selection.selected]; + plannerStatus.textContent = selection.selected + ? `Stage 3 selected ${selection.selected} (cost ${cost.total} ${cost.unit}) of ${result.stage1_logical_asap_optimization.combinations} candidates.` + : `Stage 3 selected no plan: ${selection.error || result.stage1_logical_asap_optimization.error || selection.rejected.map((r) => `${r.id}: ${r.reason}`).join('; ')}`; + } catch (error) { + // Without a response the page is not served by server.py. + plannerStatus.textContent = response + ? `Planning failed: ${error.message}` + : `Planning failed: ${error.message}. Start this page with server.py.`; + } finally { + $('plannerRun').disabled = false; + } + }); + + addSchemaRow({ + name: 'metrics', + columns: 'ts TIMESTAMP NOT NULL\nservice UTF8 NOT NULL\nregion UTF8 NOT NULL\nlatency FLOAT64 NOT NULL\nbytes INT64 NOT NULL', + timeIndex: 'ts', + }); + addSchemaRow({ + name: 'hosts', + columns: 'service UTF8 NOT NULL\nregion UTF8 NOT NULL', + }); + addPlannerRow({ name: 'count_by_service', schemas: ['metrics'] }); + addPlannerRow({ name: 'avg_latency', schemas: ['metrics'], text: 'SELECT service, AVG(latency) FROM metrics GROUP BY service' }); + addPlannerRow({ + name: 'q3', + language: 'promql', + text: 'topk(5, rate(http_requests_total[5m]))', + }); + addPlannerRow({ + name: 'q6', + language: 'sql', + schemas: ['metrics', 'hosts'], + text: 'SELECT metrics.service, COUNT(*) FROM metrics JOIN hosts ON metrics.service = hosts.service GROUP BY metrics.service', + }); + addPlannerRow({ + name: 'q4', + language: 'promql', + text: 'topk(10, rate(http_requests_total[5m]))', + }); +})(); diff --git a/tools/dag-viewer/examples.json b/tools/dag-viewer/examples.json new file mode 100644 index 000000000..8b9ddac2a --- /dev/null +++ b/tools/dag-viewer/examples.json @@ -0,0 +1,23 @@ +[ + { + "id": "example1", + "name": "1 · dashboard panels", + "example": "planner-layering-1", + "file": "out/example1.json", + "story": "Two PromQL panels over the last minute, every 10 s: Q1 the exact per-job request rate, Q2 the top-10 series per job within ε = 0.01, δ = 0.001 and 100 ms." + }, + { + "id": "example3a", + "name": "3a · historical p99 batch", + "example": "planner-layering-3a", + "file": "out/example3a.json", + "story": "An ad hoc batch of five p99 reports over historical intervals of 1 to 5 years, run once." + }, + { + "id": "example3b", + "name": "3b · live p99 panel", + "example": "planner-layering-3b", + "file": "out/example3b.json", + "story": "A p99 panel over the last 5 min, every minute, within 200 ms." + } +] diff --git a/tools/dag-viewer/examples/scalar-queries.json b/tools/dag-viewer/examples/scalar-queries.json deleted file mode 100644 index 6d861ee4f..000000000 --- a/tools/dag-viewer/examples/scalar-queries.json +++ /dev/null @@ -1,2802 +0,0 @@ -{ - "format": "asap-stage-pipeline/v1", - "stage0_query_language_frontends": { - "dag": { - "nodes": [ - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "m" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 0, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 1, - "filters": [], - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "source": { - "TimeSeries": { - "metric": "n" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 3, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 4, - "filters": [], - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "source": { - "TimeSeries": { - "metric": "k" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 6, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Aggregate": { - "child": 7, - "filters": [], - "having": null, - "measures": [ - { - "col": null, - "kind": "sum" - } - ], - "output_names": [ - "" - ], - "reduction": { - "Reduce": [ - 2 - ] - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - } - ], - "roots": [ - { - "Scalar": { - "PromqlScalarFromVector": 2 - } - }, - { - "Operator": 5 - }, - { - "Scalar": "EvalTimestamp" - }, - { - "Operator": 8 - }, - { - "Scalar": { - "Literal": { - "Float64": 3.0 - } - } - } - ] - } - }, - "stage1_logical_asap_optimization": { - "candidates": [ - { - "dag": { - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "m" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 0, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 2 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "source": { - "TimeSeries": { - "metric": "n" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 4, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "source": { - "TimeSeries": { - "metric": "k" - } - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "TimeRange": { - "child": 8, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryAgg": { - "child": 9, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - } - } - }, - "result_kind": "state", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 10 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - } - ], - "roots": [ - { - "Scalar": { - "PromqlScalarFromVector": 3 - } - }, - { - "Operator": 7 - }, - { - "Scalar": "EvalTimestamp" - }, - { - "Operator": 11 - }, - { - "Scalar": { - "Literal": { - "Float64": 3.0 - } - } - } - ] - }, - "display_name": "Q1 exact (Sum acc) · Q2 exact (Sum acc) · Q3 exact · Q4 exact (Sum acc) · Q5 exact", - "id": "L1" - } - ], - "capped": false, - "combinations": 1 - }, - "stage2_physical_asap_optimization": { - "candidates": [ - { - "dag": { - "edges": [ - { - "consumer": 1, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "producer": 1, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 3, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 5, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "producer": 4, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 6, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "producer": 5, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 7, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "producer": 6, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 9, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "producer": 8, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 10, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "producer": 9, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 11, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "producer": 10, - "role": "Input", - "window": "NotApplicable" - } - ], - "nodes": [ - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 0, - "materialization": "NotMaterialized", - "output_schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "source": { - "TimeSeries": { - "metric": "m" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 1, - "materialization": "NotMaterialized", - "output_schema": { - "closed": false, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 0, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - } - }, - { - "guarantee": null, - "id": 2, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 3, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 2 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 4, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "source": { - "TimeSeries": { - "metric": "n" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 5, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 2, - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 4, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - } - }, - { - "guarantee": null, - "id": 6, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 5, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 7, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 8, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "Scan": { - "predicates": [], - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "source": { - "TimeSeries": { - "metric": "k" - } - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ] - }, - "id": 9, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "value", - "nullable": false, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "NonASAP": { - "TimeRange": { - "child": 8, - "kind": "instant", - "range": { - "nanos": 0, - "secs": 15 - } - } - } - } - }, - { - "guarantee": null, - "id": 10, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 9, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - } - } - } - }, - { - "guarantee": { - "bound": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute_value", - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ] - }, - "id": 11, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "float64" - }, - "name": "sum", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 10 - } - } - } - } - ], - "roots": [ - 7, - 11 - ], - "scalar_roots": [ - [ - 0, - { - "PromqlScalarFromVector": 3 - } - ], - [ - 2, - "EvalTimestamp" - ], - [ - 4, - { - "Literal": { - "Float64": 3.0 - } - } - ] - ] - }, - "display_name": "Q1 exact (Sum acc) · Q2 exact (Sum acc) · Q3 exact · Q4 exact (Sum acc) · Q5 exact", - "from_logical": "L1", - "id": "P1" - } - ], - "pruned": [] - }, - "stage3_plan_selection": { - "costs": { - "P1": { - "per_node": { - "0": { - "cost": 0.000010833333333333334, - "detail": "scan 15000 samples; x 0.0003/s", - "multiplier": 1 - }, - "1": { - "cost": 4.166666666666667e-6, - "detail": "time range 15s: pass 15000 rows; x 0.0003/s", - "multiplier": 1 - }, - "10": { - "cost": 4.166666666666667e-6, - "detail": "build exact Sum accumulator into 100 states: 15000 rows x depth 1; x 0.0003/s", - "multiplier": 1 - }, - "11": { - "cost": 2.7777777777777774e-8, - "detail": "finalize 100 accumulators; x 0.0003/s", - "multiplier": 1 - }, - "2": { - "cost": 4.166666666666667e-6, - "detail": "build exact Sum accumulator into 1 states: 15000 rows x depth 1; x 0.0003/s", - "multiplier": 1 - }, - "3": { - "cost": 2.7777777777777777e-10, - "detail": "finalize 1 accumulators; x 0.0003/s", - "multiplier": 1 - }, - "4": { - "cost": 0.0000175, - "detail": "scan 15000 samples; x 0.0003/s", - "multiplier": 1 - }, - "5": { - "cost": 4.166666666666667e-6, - "detail": "time range 15s: pass 15000 rows; x 0.0003/s", - "multiplier": 1 - }, - "6": { - "cost": 4.166666666666667e-6, - "detail": "build exact Sum accumulator into 1 states: 15000 rows x depth 1; x 0.0003/s", - "multiplier": 1 - }, - "7": { - "cost": 2.7777777777777777e-10, - "detail": "finalize 1 accumulators; x 0.0003/s", - "multiplier": 1 - }, - "8": { - "cost": 0.000024166666666666663, - "detail": "scan 15000 samples; x 0.0003/s", - "multiplier": 1 - }, - "9": { - "cost": 4.166666666666667e-6, - "detail": "time range 15s: pass 15000 rows; x 0.0003/s", - "multiplier": 1 - } - }, - "source": "analytical-cost-v2 (illustrative statistics)", - "total": 0.00007752833333333333, - "unit": "cost_per_second" - } - }, - "rejected": [], - "selected": "P1" - }, - "workload": { - "queries": [ - { - "id": "q1", - "language": "promql", - "requirements": { - "accuracy": "exact" - }, - "text": "scalar(sum(m))" - }, - { - "id": "q2", - "language": "promql", - "requirements": { - "accuracy": "exact" - }, - "text": "sum(n)" - }, - { - "id": "q3", - "language": "promql", - "requirements": { - "accuracy": "exact" - }, - "text": "time()" - }, - { - "id": "q4", - "language": "promql", - "requirements": { - "accuracy": "exact" - }, - "text": "sum by (job) (k)" - }, - { - "id": "q5", - "language": "promql", - "requirements": { - "accuracy": "exact" - }, - "text": "1 + 2" - } - ] - } -} diff --git a/tools/dag-viewer/generate-sample.sh b/tools/dag-viewer/generate-sample.sh deleted file mode 100755 index 74dfc1611..000000000 --- a/tools/dag-viewer/generate-sample.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Regenerates tools/dag-viewer/dag.example.json, the stage_pipeline document -# the viewer opens with: the Query planner's default workload (SQL over its -# default tables, and PromQL). Run from anywhere in the repo; edit the -# --table/--sql/--promql lines below to try your own queries. -set -euo pipefail -cd "$(dirname "${BASH_SOURCE[0]}")/../.." - -# --epsilon asks for an approximate accuracy target instead of the default -# Exact, so Stage 1 has sketch candidates to offer. The document lists the -# first 4 candidates and the selected one (display only: Stage 3 still -# selects among all of them). -cargo run -q -p asap-devtools --bin stage_pipeline -- \ - --epsilon 0.01 --max-displayed 4 \ - --table '{"name":"metrics","columns":[{"name":"ts","type":"timestamp","nullable":false},{"name":"service","type":"utf8","nullable":false},{"name":"region","type":"utf8","nullable":false},{"name":"latency","type":"float64","nullable":false},{"name":"bytes","type":"int64","nullable":false}],"time_index":0}' \ - --table '{"name":"hosts","columns":[{"name":"service","type":"utf8","nullable":false},{"name":"region","type":"utf8","nullable":false}]}' \ - --sql "SELECT service, COUNT(*) FROM metrics GROUP BY service" --name count_by_service \ - --sql "SELECT service, AVG(latency) FROM metrics GROUP BY service" --name avg_latency \ - --promql "topk(5, rate(http_requests_total[5m]))" --name q3 \ - --sql "SELECT metrics.service, COUNT(*) FROM metrics JOIN hosts ON metrics.service = hosts.service GROUP BY metrics.service" --name q6 \ - --promql "topk(10, rate(http_requests_total[5m]))" --name q4 \ - --out tools/dag-viewer/dag.example.json - -echo "wrote tools/dag-viewer/dag.example.json" diff --git a/tools/dag-viewer/index.html b/tools/dag-viewer/index.html index 77f2da59c..23ffce129 100644 --- a/tools/dag-viewer/index.html +++ b/tools/dag-viewer/index.html @@ -2,483 +2,215 @@ -ASAP query DAG viewer - - - - - +ASAPPlanner Stage Viewer - -
    -

    ASAP query DAG viewer

    -
    Drop a stage_pipeline document here, or click to choose one
    - -
    - -
    - - - - Click an edge to inspect its schema -
    - -
    -
    -
    -

    Input table schemas

    - - One column per line: name TYPE [NOT NULL]. PromQL schemas are inferred from metric usage. +
    +
    +

    ASAPPlanner Stage Viewer

    +

    The planner's stages for one workload: the query-language frontends lower the queries into one logical DAG (Stage 0), Pass 1 and Pass 2 propose logical ASAP candidates (Stage 1), each becomes a physical candidate (Stage 2), and Stage 3 checks every physical candidate, prices the valid ones and selects the cheapest.

    + +
    + + + +
    -
    -
    -
    -
    - - - - Requires the local interactive server. -
    -
    + +

    +
    Pick an example, open a stage document, or plan queries in the editor.
    +
    + -
    - -
    -
    -
    +
    +
    +

    Stage 3 · plans by cost

    +
    +
      +
      -
      -
      - Load a JSON document produced by - cargo run -p asap-devtools --bin stage_pipeline -- --promql "..." --out dag.json - to get started. -
      -