diff --git a/crates/asap-aware-mapping/src/analytical_cost.rs b/crates/asap-aware-mapping/src/analytical_cost.rs index 1dd2f9eea..ed05154d1 100644 --- a/crates/asap-aware-mapping/src/analytical_cost.rs +++ b/crates/asap-aware-mapping/src/analytical_cost.rs @@ -322,6 +322,12 @@ pub enum PhysicalOperator { offset: u64, }, PassThrough, + /// Moves when its input is evaluated (PromQL `offset`): the rows pass + /// unchanged and nothing is computed. + TimeShift, + /// Keeps the rows of its input inside a time window: priced by the + /// rows it keeps. + TimeRange, PromqlRange { range_millis: u64, }, @@ -881,7 +887,9 @@ fn statistics_match_operator(operator: PhysicalOperator, statistics: &OperatorSt ) } PhysicalOperator::Limit { .. } => matches!(statistics, OperatorStatistics::Limit { .. }), - PhysicalOperator::PassThrough => { + PhysicalOperator::PassThrough + | PhysicalOperator::TimeShift + | PhysicalOperator::TimeRange => { matches!(statistics, OperatorStatistics::PassThrough { .. }) } PhysicalOperator::PromqlRange { .. } => { @@ -959,6 +967,8 @@ fn expected_input_arity( | PhysicalOperator::InMemoryAnalyticWindow { .. } | PhysicalOperator::Limit { .. } | PhysicalOperator::PassThrough + | PhysicalOperator::TimeShift + | PhysicalOperator::TimeRange | PhysicalOperator::PromqlRange { .. } | PhysicalOperator::PromqlSubquery { .. } | PhysicalOperator::PromqlRelabel { .. } @@ -1130,6 +1140,12 @@ pub fn estimate_operator( per_row_width(output.rows, output.bytes)?, 0, ), + (PhysicalOperator::TimeShift, _) => ResourceEstimate::new(0.0, 0, 0), + (PhysicalOperator::TimeRange, _) => ResourceEstimate::new( + output.rows as f64, + per_row_width(output.rows, output.bytes)?, + 0, + ), (PhysicalOperator::PassThrough, _) => ResourceEstimate::new( left.rows as f64, per_row_width(output.rows, output.bytes)?, @@ -1587,7 +1603,12 @@ pub(crate) fn validate_operator_semantics( } validate_partitioning(input, input_partitioning, partitioned)?; } - (PhysicalOperator::PassThrough, _) => { + (PhysicalOperator::TimeRange, _) => { + if output.rows > input.rows || output.bytes > input.bytes { + return inconsistent("a time range keeps more rows than it reads"); + } + } + (PhysicalOperator::PassThrough | PhysicalOperator::TimeShift, _) => { if input != output { return inconsistent("cardinality-preserving operator changes its edge"); } @@ -2274,6 +2295,44 @@ mod tests { } } + /// A time shift only moves when its input is evaluated: it costs + /// nothing. A time range is priced by the rows it keeps, and keeps no + /// more than it reads. + #[test] + fn time_shift_is_free_and_time_range_is_priced_by_the_rows_it_keeps() { + let shift = estimate_operator( + PhysicalOperator::TimeShift, + OperatorStatistics::PassThrough { + edges: unary_row_edges(1_000, 1_000), + }, + ) + .unwrap(); + assert_eq!(shift.cpu_ops(), 0.0); + assert_eq!(shift.scan_bytes(), 0); + let range = estimate_operator( + PhysicalOperator::TimeRange, + OperatorStatistics::PassThrough { + edges: unary_row_edges(1_000, 200), + }, + ) + .unwrap(); + assert_eq!(range.cpu_ops(), 200.0); + assert!(estimate_operator( + PhysicalOperator::TimeRange, + OperatorStatistics::PassThrough { + edges: unary_row_edges(200, 1_000), + }, + ) + .is_err()); + assert!(estimate_operator( + PhysicalOperator::TimeShift, + OperatorStatistics::PassThrough { + edges: unary_row_edges(1_000, 200), + }, + ) + .is_err()); + } + fn filter_operator() -> PhysicalOperator { PhysicalOperator::Filter { predicate_operations_per_row: 1, diff --git a/crates/asap-aware-mapping/src/asap_aware_cse.rs b/crates/asap-aware-mapping/src/asap_aware_cse.rs index 2187df33f..465b60fb4 100644 --- a/crates/asap-aware-mapping/src/asap_aware_cse.rs +++ b/crates/asap-aware-mapping/src/asap_aware_cse.rs @@ -2,8 +2,9 @@ //! common-subexpression elimination, as defined in //! `docs/design_docs/proposals/planner-layering.md` (Algorithm 2). //! -//! Two of its rules are implemented: the identical-expression rule and the -//! summary-capability rule. +//! Its three rules are implemented: the identical-expression rule, the +//! summary-capability rule and, for tumbling panes of one query, the +//! window-composition rule. //! //! # Identical-expression rule //! @@ -40,8 +41,27 @@ //! minimum), and every guarantee above it is composed again, so plan //! selection checks each consumer against the shared state. Members of //! equal size are the identical-expression rule's; builds that are not -//! shared are untouched, and a consumer never changes family. The window- -//! composition rule is not implemented. +//! shared are untouched, and a consumer never changes family. +//! +//! # Window-composition rule +//! +//! A query repeating every `E` over a window `W` can build its summary as +//! back-to-back tumbling panes of width `w = gcd(W, E)` (Algorithm 2's +//! `Tumbling(L)` for one query), merged before each read. A *pane site* +//! ([`pane_sites`]) is a `SummaryAgg` over a range `TimeRange(W)` whose +//! family merges in the family-capability table ([`FamilyCapability`]): +//! exact accumulators included, and also families whose merged readouts +//! are only approximate (heap top-k), whose readers then carry no +//! guarantee and are left to plan selection's evidence. A family without a +//! merge (IRate) has no site. [`window_composition_variants`] returns one +//! candidate per non-empty subset of the sites: each site in the subset +//! becomes a `SummaryMerge` over one [`ASAPOp::PaneChain`] of `W / w` panes, +//! a compact node whatever the pane count, with the build's family and +//! size (a mergeable family's merged state has one build's guarantee), and +//! every guarantee above is composed again. Nothing is materialized here: +//! the panes are rebuilt at each evaluation until Stage 2 keeps them. A pane +//! width shared by several queries, sliding windows and Exponential +//! Histograms are not implemented. use std::collections::HashMap; #[cfg(test)] @@ -49,7 +69,9 @@ use std::collections::HashSet; use std::rc::Rc; use asap_types::ir::cse::share_common_sub_dags; -use asap_types::ir::{ASAPOp, Operator, OperatorNode, QueryRoot}; +use asap_types::ir::{ + ASAPOp, NonASAPOp, Operator, OperatorNode, OperatorResultKind, QueryRoot, TimeRangeKind, +}; use asap_types::post_asap::{ FamilyCapability, FieldDataType, GroupingStrategy, SketchAlgorithm, SketchKind, }; @@ -601,6 +623,207 @@ fn sized_for_all( Ok(Some(Rc::new(build))) } +/// One summary build the window-composition rule can build as tumbling +/// panes: a `SummaryAgg` over a range `TimeRange(W)` whose family merges +/// (the family-capability table: exact accumulators included, and families +/// whose merged readouts are only approximate), read only by queries that +/// repeat at a fixed interval. Its panes are `pane_count = W / w` back-to-back +/// windows of `w = gcd(W, E)` over the queries' intervals `E`, at least two. +#[derive(Debug, Clone)] +pub struct PaneSite { + pub build: Rc, + /// The queries (indices into the roots) that read the build. + pub readers: Vec, + pub pane_width_ms: u64, + pub pane_count: u32, +} + +/// A Pass 2 candidate of the window-composition rule: the candidate's roots +/// with each build in `sites` (indices into [`pane_sites`]) built as its +/// tumbling panes, merged before every read, and every guarantee composed +/// again; the error when that fails, which leaves the other variants +/// unaffected. +#[derive(Debug)] +pub struct WindowCompositionVariant { + pub sites: Vec, + pub roots: Result, PerComputationCandidateError>, +} + +/// The most pane sites one candidate may have: every non-empty subset is a +/// candidate, about a million at 20. +pub const MAX_PANE_SITES: usize = 20; + +/// The pane sites of the candidate with query roots `roots`, children +/// first. `interval_ms[q]` is how often query `q` repeats, `None` when it +/// does not repeat at a fixed interval. +pub fn pane_sites(roots: &[QueryRoot], interval_ms: &[Option]) -> Vec { + let mut nodes = Vec::new(); + let mut seen = std::collections::HashSet::new(); + for node in roots.iter().flat_map(root_operators) { + collect_children_first(node, &mut seen, &mut nodes); + } + let reach: Vec> = roots + .iter() + .map(|root| { + root_operators(root) + .into_iter() + .flat_map(OperatorNode::reachable) + .map(|node| Rc::as_ptr(&node)) + .collect() + }) + .collect(); + nodes + .into_iter() + .filter_map(|build| { + let window_ms = pane_window_ms(&build)?; + let readers: Vec = (0..roots.len()) + .filter(|&q| reach[q].contains(&Rc::as_ptr(&build))) + .collect(); + let mut width = window_ms; + for &q in &readers { + width = gcd(width, interval_ms.get(q).copied().flatten()?); + } + let pane_count = u32::try_from(window_ms / width).ok()?; + (!readers.is_empty() && pane_count >= 2).then_some(PaneSite { + build, + readers, + pane_width_ms: width, + pane_count, + }) + }) + .collect() +} + +/// The window `W` of a build the rule can split: a `SummaryAgg` whose +/// family merges, over a range `TimeRange(W)` over an instant vector read +/// at the query's time or a fixed offset from it. +fn pane_window_ms(build: &OperatorNode) -> Option { + let Some(ASAPOp::SummaryAgg { child, family, .. }) = build.asap() else { + return None; + }; + FamilyCapability::of(family).merge?; + let Some(NonASAPOp::TimeRange { + range, + kind: TimeRangeKind::Range, + child: input, + }) = child.non_asap() + else { + return None; + }; + if input.result_kind != OperatorResultKind::InstantVector + || matches!(input.non_asap(), Some(NonASAPOp::TimeShift { shift, .. }) if shift.at.is_some()) + { + return None; + } + u64::try_from(range.as_millis()).ok().filter(|&ms| ms > 0) +} + +fn gcd(a: u64, b: u64) -> u64 { + if b == 0 { + a + } else { + gcd(b, a % b) + } +} + +/// Every Pass 2 candidate of the window-composition rule for the candidate +/// with query roots `roots` and pane sites `sites` ([`pane_sites`]): one per +/// non-empty subset of the sites, in binary-counter order (the first site +/// the lowest bit). Each build in the subset becomes a `SummaryMerge` over +/// one [`ASAPOp::PaneChain`] of its panes; every other build is untouched. +/// An error only for more than [`MAX_PANE_SITES`] sites; a variant whose +/// composition fails carries its own error. +pub fn window_composition_variants( + roots: &[QueryRoot], + sites: &[PaneSite], +) -> Result, PerComputationCandidateError> { + if sites.len() > MAX_PANE_SITES { + return Err(PerComputationCandidateError::Unsupported( + "more than 20 summary builds that could be built in tumbling panes (2^n candidates)", + )); + } + let mut variants = Vec::new(); + for mask in 1u64..(1u64 << sites.len()) { + let chosen: Vec = (0..sites.len()).filter(|&i| mask >> i & 1 == 1).collect(); + variants.push(WindowCompositionVariant { + roots: in_panes(roots, chosen.iter().map(|&i| &sites[i])), + sites: chosen, + }); + } + Ok(variants) +} + +/// `roots` with each of `sites` built as its tumbling panes, and every +/// guarantee composed again. +fn in_panes<'a>( + roots: &[QueryRoot], + sites: impl Iterator, +) -> Result, PerComputationCandidateError> { + let mut replaced: HashMap<*const OperatorNode, Rc> = HashMap::new(); + for site in sites { + replaced.insert(Rc::as_ptr(&site.build), merged_panes(site)?); + } + let mut rebuilt: HashMap<*const OperatorNode, Rc> = HashMap::new(); + let mut out = Vec::new(); + for root in roots { + out.push(match root { + QueryRoot::Operator(node) => { + QueryRoot::Operator(rebuild(node, &replaced, &mut rebuilt)?) + } + QueryRoot::Scalar(expr) => { + let mut nodes = HashMap::new(); + for node in expr.operator_refs() { + nodes.insert(Rc::as_ptr(node), rebuild(node, &replaced, &mut rebuilt)?); + } + QueryRoot::Scalar( + expr.map_operator_refs(&mut |node| nodes[&Rc::as_ptr(node)].clone()), + ) + } + }); + } + with_composed_guarantees(&out) +} + +/// `SummaryMerge` over the [`ASAPOp::PaneChain`] of `site`'s panes, with +/// the build's output names. +fn merged_panes(site: &PaneSite) -> Result, PerComputationCandidateError> { + let Some(ASAPOp::SummaryAgg { + child: range, + family, + input, + reduction, + grouping, + filter, + }) = site.build.asap() + else { + unreachable!("a pane site is a SummaryAgg"); + }; + let mut chain = OperatorNode::new(Operator::ASAP(ASAPOp::PaneChain { + child: Rc::clone(range.children()[0]), + family: family.clone(), + input: input.clone(), + reduction: reduction.clone(), + grouping: grouping.clone(), + filter: filter.clone(), + pane_width_ms: site.pane_width_ms, + pane_count: site.pane_count, + }))?; + for (field, kept) in chain + .schema + .fields + .iter_mut() + .zip(&site.build.schema.fields) + { + field.name = kept.name.clone(); + field.table = kept.table.clone(); + } + Ok(Rc::new(OperatorNode::new(Operator::ASAP( + ASAPOp::SummaryMerge { + children: vec![Rc::new(chain)], + }, + ))?)) +} + /// `node` with every replaced build below it swapped for its shared build; /// the same `Rc` when nothing below changed. fn rebuild( @@ -835,8 +1058,20 @@ mod tests { /// The composed candidate of `queries` (each at its own ε, δ = 0.01) /// in which every target chose `family`. fn chose(queries: &[(&str, f64)], family: SketchAlgorithm) -> Vec { + use crate::per_computation_candidates::ComputationCandidate; + chose_where(queries, |c| { + *c == ComputationCandidate::Summary(family.clone()) + }) + } + + /// The composed candidate of `queries` (each at its own ε, δ = 0.01) + /// in which every target chose the first candidate `pick` accepts. + fn chose_where( + queries: &[(&str, f64)], + pick: impl Fn(&crate::per_computation_candidates::ComputationCandidate) -> bool, + ) -> Vec { use crate::per_computation_candidates::{ - compose_logical_candidate, generate_per_computation_candidates, ComputationCandidate, + compose_logical_candidate, generate_per_computation_candidates, }; let roots = queries .iter() @@ -861,7 +1096,7 @@ mod tests { t.choices .candidates .iter() - .position(|c| *c == ComputationCandidate::Summary(family.clone())) + .position(&pick) .expect("the family is a candidate") }) .collect(); @@ -1071,4 +1306,132 @@ mod tests { } } } + + /// The pane sites of `roots` as (pane width, pane count). + fn panes(roots: &[QueryRoot], interval_ms: &[Option]) -> Vec<(u64, u32)> { + pane_sites(roots, interval_ms) + .iter() + .map(|site| (site.pane_width_ms, site.pane_count)) + .collect() + } + + /// A 5-min window evaluated every 2 min, 90 s or 1 min is built in panes + /// of gcd(window, interval); a query evaluated once per window, or not + /// at a fixed interval, has no panes. + #[test] + fn pane_width_is_the_gcd_of_the_window_and_the_interval() { + let roots = chose( + &[("quantile_over_time(0.99, m[5m])", 0.01)], + SketchAlgorithm::Kll, + ); + assert_eq!(panes(&roots, &[Some(120_000)]), [(60_000, 5)]); + assert_eq!(panes(&roots, &[Some(90_000)]), [(30_000, 10)]); + assert_eq!(panes(&roots, &[Some(60_000)]), [(60_000, 5)]); + assert!(panes(&roots, &[Some(300_000)]).is_empty()); + assert!(panes(&roots, &[None]).is_empty()); + } + + /// Exact accumulators whose states merge get panes; IRate, which reads + /// the last two samples of the window, does not. + #[test] + fn exact_accumulators_that_merge_get_panes() { + use crate::per_computation_candidates::ComputationCandidate; + let accumulator = + |c: &ComputationCandidate| matches!(c, ComputationCandidate::ExactAccumulator { .. }); + for query in [ + "rate(m[5m])", + "increase(m[5m])", + "sum_over_time(m[5m])", + "max_over_time(m[5m])", + ] { + let roots = chose_where(&[(query, 0.01)], accumulator); + assert_eq!(panes(&roots, &[Some(60_000)]), [(60_000, 5)], "{query}"); + } + let roots = chose_where(&[("irate(m[5m])", 0.01)], accumulator); + assert!(panes(&roots, &[Some(60_000)]).is_empty()); + } + + /// The rule's candidate reads a `SummaryMerge` over one `PaneChain` of + /// the build's family and size over the range's input, keeps the + /// build's output names, and keeps the whole build's guarantee (a KLL + /// merges into the state of one build over the union). + #[test] + fn panes_replace_the_build_with_a_merged_chain() { + let roots = chose( + &[("quantile_over_time(0.99, m[5m])", 0.01)], + SketchAlgorithm::Kll, + ); + let sites = pane_sites(&roots, &[Some(60_000)]); + let variants = window_composition_variants(&roots, &sites).unwrap(); + let [variant] = variants.as_slice() else { + panic!("one variant: {variants:?}") + }; + assert_eq!(variant.sites, [0]); + let panes = variant.roots.as_ref().unwrap(); + let QueryRoot::Operator(root) = &panes[0] else { + panic!("operator root") + }; + root.validate_structure().unwrap(); + let QueryRoot::Operator(whole) = &roots[0] else { + panic!("operator root") + }; + assert_eq!(root.guarantee, whole.guarantee); + assert!(root.guarantee.is_some()); + let merge = OperatorNode::reachable(root) + .into_iter() + .find(|n| matches!(n.asap(), Some(ASAPOp::SummaryMerge { .. }))) + .expect("a merge"); + let Some(ASAPOp::SummaryMerge { children }) = merge.asap() else { + unreachable!() + }; + let [chain] = children.as_slice() else { + panic!("one chain") + }; + let Some(ASAPOp::PaneChain { + child, + family, + pane_width_ms: 60_000, + pane_count: 5, + .. + }) = chain.asap() + else { + panic!("{:?}", chain.operator) + }; + let Some(ASAPOp::SummaryAgg { + child: range, + family: whole_family, + .. + }) = sites[0].build.asap() + else { + unreachable!() + }; + assert_eq!(family, whole_family); + assert_eq!(child.operator, range.children()[0].operator); + assert_eq!(chain.schema, sites[0].build.schema); + assert_eq!(merge.coverage(), sites[0].build.coverage()); + } + + /// Two builds that could be split give three candidates: each alone and + /// both, in binary-counter order. + #[test] + fn every_non_empty_subset_of_the_sites_is_a_candidate() { + let roots = chose( + &[ + ("quantile_over_time(0.99, m[5m])", 0.01), + ("quantile_over_time(0.5, m[2m])", 0.01), + ], + SketchAlgorithm::Kll, + ); + let sites = pane_sites(&roots, &[Some(60_000), Some(60_000)]); + assert_eq!(sites.len(), 2); + let subsets: Vec<_> = window_composition_variants(&roots, &sites) + .unwrap() + .into_iter() + .map(|v| { + assert!(v.roots.is_ok()); + v.sites + }) + .collect(); + assert_eq!(subsets, [vec![0], vec![1], vec![0, 1]]); + } } diff --git a/crates/asap-aware-mapping/src/pass/stage1_to_stage3.rs b/crates/asap-aware-mapping/src/pass/stage1_to_stage3.rs index b7c533af6..f05101a2f 100644 --- a/crates/asap-aware-mapping/src/pass/stage1_to_stage3.rs +++ b/crates/asap-aware-mapping/src/pass/stage1_to_stage3.rs @@ -15,14 +15,20 @@ //! groups), then those of the summary-capability rule //! ([`summary_capability_variants`]: one per choice of shared summary //! builds), each followed by its own identical-expression candidates, -//! every distinct candidate once; the independent candidate is kept; +//! and, for the composed candidate and each summary-capability candidate, +//! those of the window-composition rule ([`window_composition_variants`]: +//! one per non-empty subset of the builds a repeating query could build +//! as tumbling panes), each followed by its own identical-expression +//! candidates; every distinct candidate once; the independent candidate +//! is kept; //! 2. Stage 2, physical ASAP-aware optimization of every Stage 1 candidate //! ([`optimize_physical_asap`]); //! 3. Stage 3, plan selection over the physical candidates ([`select_plan`]). //! //! Stage 0, the query-language frontends, runs before it (the `asap-planner` -//! facade lowers the workload). Pass 2's window-composition rule is not -//! planned yet. +//! facade lowers the workload). The window-composition rule offers +//! per-query tumbling panes only; sliding windows, Exponential Histograms +//! and a pane width shared across queries are not planned yet. //! //! Every combination is enumerated and plan selection prices every //! candidate; nothing is capped. A search that avoids building every @@ -32,14 +38,15 @@ use std::rc::Rc; use asap_types::ir::flat::flatten; use asap_types::ir::schema_support::with_promql_series_identity; -use asap_types::ir::{OperatorNode, QueryRoot}; -use asap_types::post_asap::SketchAlgorithm; +use asap_types::ir::{ASAPOp, OperatorNode, QueryRoot}; +use asap_types::post_asap::{FieldDataType, SketchAlgorithm}; use asap_types::types::{AccuracyTarget, RequestedAccuracy}; -use asap_types::workload::{DataWorkload, QueryLanguage, QueryRecurrence}; +use asap_types::workload::{DataWorkload, QueryLanguage, QueryRecurrence, RepeatedDemand}; use super::{OptimizationInput, OptimizationPass, OptimizeError, PlanOutput, QueryPlan}; use crate::asap_aware_cse::{ - capability_groups, identical_expression_variants, sharing_groups, summary_capability_variants, + capability_groups, identical_expression_variants, pane_sites, sharing_groups, + summary_capability_variants, window_composition_variants, }; use crate::per_computation_candidates::{ compose_logical_candidate, generate_per_computation_candidates, ComputationCandidate, @@ -66,14 +73,17 @@ pub struct LogicalCandidate { /// A Stage 1 candidate Pass 2 added: `id` is `from_logical` with each /// summary build set in `summaries` made one build sized for all its /// consumers (the summary-capability rule, e.g. "UnivMon for Q1, Q3"), -/// then the nodes of each group in `shared` (named by operator kind, -/// children first) made one node (the identical-expression rule). It has -/// `from_logical`'s `choice`. +/// then each build in `panes` built as tumbling panes (the +/// window-composition rule, e.g. "Kll for Q1 in 5 × 1m panes"), then the +/// nodes of each group in `shared` (named by operator kind, children first) +/// made one node (the identical-expression rule). It has `from_logical`'s +/// `choice`. #[derive(Debug, Clone, PartialEq)] pub struct Pass2Candidate { pub id: String, pub from_logical: String, pub summaries: Vec, + pub panes: Vec, pub shared: Vec, } @@ -179,6 +189,8 @@ pub struct Pass2Of { pub from: usize, /// The summary builds made one build each (summary-capability rule). pub summaries: Vec, + /// The builds built as tumbling panes (window-composition rule). + pub panes: Vec, /// The identical groups shared (operator kinds, children first). pub shared: Vec, } @@ -187,14 +199,20 @@ pub struct Pass2Of { /// candidate at a time: each composed Pass 1 candidate (every choice of a /// per-computation candidate for every target, the last target varying /// fastest), followed by its Pass 2 candidates: the identical-expression -/// rule's, then each summary-capability candidate followed by its own -/// identical-expression candidates. A Pass 2 candidate equal to an earlier -/// one of the same Pass 1 candidate (same nodes, same sharing) is listed -/// once. Lazy and uncapped: a caller that limits the candidates stops -/// consuming it. -pub fn stage1_logical_asap_optimization( - per_computation: &PerComputationCandidates, -) -> impl Iterator + '_ { +/// rule's, then the window-composition rule's, then each summary-capability +/// candidate followed by its own identical-expression and +/// window-composition candidates; every window-composition candidate is +/// followed by its own identical-expression candidates. `recurrence[q]` is +/// how often query `q` is evaluated: the window-composition rule splits +/// only builds of queries that repeat at a fixed interval. A Pass 2 +/// candidate equal to an earlier one of the same Pass 1 candidate (same +/// nodes, same sharing) is listed once. Lazy and uncapped: a caller that +/// limits the candidates stops consuming it. +pub fn stage1_logical_asap_optimization<'a, Id: Clone>( + per_computation: &'a PerComputationCandidates, + recurrence: &[QueryRecurrence], +) -> impl Iterator + 'a { + let interval_ms: Vec> = recurrence.iter().map(fixed_interval_ms).collect(); let query_of_target = query_of_target(per_computation); let mut choice = Some(vec![0; per_computation.targets.len()]); let mut queue = std::collections::VecDeque::new(); @@ -215,7 +233,7 @@ pub fn stage1_logical_asap_optimization( .map(|roots| roots.into_iter().map(|(_, root)| root).collect::>()); let from = position + queue.len(); let pass2 = match &roots { - Ok(roots) => pass2_candidates(roots), + Ok(roots) => pass2_candidates(roots, &interval_ms), Err(_) => Vec::new(), }; queue.push_back(Stage1Candidate { @@ -224,11 +242,20 @@ pub fn stage1_logical_asap_optimization( roots, pass2_of: None, }); - for (summaries, shared, roots) in pass2 { + for Pass2 { + summaries, + panes, + shared, + roots, + } in pass2 + { let mut name = display_name.clone(); if !summaries.is_empty() { name += &format!(" · one {}", summaries.join(", one ")); } + if !panes.is_empty() { + name += &format!(" · {}", panes.join(", ")); + } if !shared.is_empty() { name += &format!(" · shared {}", shared.join(", ")); } @@ -239,6 +266,7 @@ pub fn stage1_logical_asap_optimization( pass2_of: Some(Pass2Of { from, summaries, + panes, shared, }), }); @@ -250,26 +278,52 @@ pub fn stage1_logical_asap_optimization( } /// A Pass 2 candidate: the summary builds it shares (summary-capability -/// rule), the identical groups it shares, and its roots. -type Pass2 = ( - Vec, - Vec, - Result, PerComputationCandidateError>, -); +/// rule), the builds it builds as tumbling panes (window-composition rule), +/// the identical groups it shares, and its roots. +struct Pass2 { + summaries: Vec, + panes: Vec, + shared: Vec, + roots: Result, PerComputationCandidateError>, +} + +impl Pass2 { + fn failed(summaries: &[String], panes: &[String], error: PerComputationCandidateError) -> Self { + Self { + summaries: summaries.to_vec(), + panes: panes.to_vec(), + shared: Vec::new(), + roots: Err(error), + } + } +} + +/// The fixed interval at which a query repeats, in milliseconds. +fn fixed_interval_ms(recurrence: &QueryRecurrence) -> Option { + match recurrence { + QueryRecurrence::Repeated( + RepeatedDemand::FixedInterval(interval) + | RepeatedDemand::FixedIntervalAt { interval, .. }, + ) => Some(u64::from(interval.0)).filter(|&ms| ms > 0), + _ => None, + } +} /// The Pass 2 candidates of the composed candidate with roots `roots`, in -/// enumeration order, each distinct candidate once. -fn pass2_candidates(roots: &[QueryRoot]) -> Vec { +/// enumeration order, each distinct candidate once. `interval_ms[q]` is the +/// fixed interval of query `q`, if it repeats at one. +fn pass2_candidates(roots: &[QueryRoot], interval_ms: &[Option]) -> Vec { let mut found = Pass2List { seen: vec![flatten(roots).0], out: Vec::new(), }; - found.identical_variants(&[], roots); + found.identical_variants(&[], &[], roots); + found.window_variants(&[], roots, interval_ms); let groups = capability_groups(roots); let variants = match summary_capability_variants(roots, &groups) { Ok(variants) => variants, Err(error) => { - found.out.push((Vec::new(), Vec::new(), Err(error))); + found.out.push(Pass2::failed(&[], &[], error)); return found.out; } }; @@ -292,12 +346,13 @@ fn pass2_candidates(roots: &[QueryRoot]) -> Vec { .collect(); match variant.roots { Ok(roots) => { - found.push(&summaries, Vec::new(), &roots); - found.identical_variants(&summaries, &roots); + found.push(&summaries, &[], Vec::new(), &roots); + found.identical_variants(&summaries, &[], &roots); + found.window_variants(&summaries, &roots, interval_ms); } // Listed as a candidate that cannot be composed; the other // variants go on. - Err(error) => found.out.push((summaries, Vec::new(), Err(error))), + Err(error) => found.out.push(Pass2::failed(&summaries, &[], error)), } } found.out @@ -311,19 +366,29 @@ struct Pass2List { } impl Pass2List { - fn push(&mut self, summaries: &[String], shared: Vec, roots: &[QueryRoot]) { + fn push( + &mut self, + summaries: &[String], + panes: &[String], + shared: Vec, + roots: &[QueryRoot], + ) { let flat = flatten(roots).0; if self.seen.contains(&flat) { return; } self.seen.push(flat); - self.out - .push((summaries.to_vec(), shared, Ok(roots.to_vec()))); + self.out.push(Pass2 { + summaries: summaries.to_vec(), + panes: panes.to_vec(), + shared, + roots: Ok(roots.to_vec()), + }); } /// The identical-expression candidates of `roots`, which shares - /// `summaries`. - fn identical_variants(&mut self, summaries: &[String], roots: &[QueryRoot]) { + /// `summaries` and builds `panes` in tumbling panes. + fn identical_variants(&mut self, summaries: &[String], panes: &[String], roots: &[QueryRoot]) { let groups = sharing_groups(roots); for variant in identical_expression_variants(roots, &groups) { let shared = variant @@ -331,11 +396,73 @@ impl Pass2List { .iter() .map(|&g| format!("{} #{}", groups[g].nodes[0].operator.kind_name(), g + 1)) .collect(); - self.push(summaries, shared, &variant.roots); + self.push(summaries, panes, shared, &variant.roots); + } + } + + /// The window-composition candidates of `roots`, which shares + /// `summaries`, each followed by its identical-expression candidates. + fn window_variants( + &mut self, + summaries: &[String], + roots: &[QueryRoot], + interval_ms: &[Option], + ) { + let sites = pane_sites(roots, interval_ms); + let variants = match window_composition_variants(roots, &sites) { + Ok(variants) => variants, + Err(error) => { + self.out.push(Pass2::failed(summaries, &[], error)); + return; + } + }; + for variant in variants { + let panes: Vec = variant + .sites + .iter() + .map(|&i| { + let site = &sites[i]; + let queries: Vec = + site.readers.iter().map(|q| format!("Q{}", q + 1)).collect(); + format!( + "{} for {} in {} × {} panes", + state_name(&site.build), + queries.join(", "), + site.pane_count, + duration_name(site.pane_width_ms) + ) + }) + .collect(); + match variant.roots { + Ok(roots) => { + self.push(summaries, &panes, Vec::new(), &roots); + self.identical_variants(summaries, &panes, &roots); + } + Err(error) => self.out.push(Pass2::failed(summaries, &panes, error)), + } } } } +/// The state a summary build keeps, e.g. "Kll" or "Rate acc". +fn state_name(build: &OperatorNode) -> String { + match build.asap().and_then(ASAPOp::produced_state) { + Some(FieldDataType::Sketch(kind, _)) => sketch_name(kind.algorithm()), + Some(FieldDataType::ExactAggregate(kind, _)) => format!("{kind:?} acc"), + _ => build.operator.kind_name().to_string(), + } +} + +/// `ms` in the largest whole unit: "1m", "10s", "250ms". +fn duration_name(ms: u64) -> String { + match ms { + ms if ms % 3_600_000 == 0 => format!("{}h", ms / 3_600_000), + ms if ms % 60_000 == 0 => format!("{}m", ms / 60_000), + ms if ms % 1_000 == 0 => format!("{}s", ms / 1_000), + ms => format!("{ms}ms"), + } +} + /// The query roots (indices) from which `node` is reachable. fn readers_of(roots: &[QueryRoot], node: &Rc) -> Vec { roots @@ -365,7 +492,7 @@ pub fn run_stage1_to_stage3_from_pass1( data: &DataWorkload, models: PlanningModels<'_>, ) -> Stage1ToStage3Run { - let stage1 = stage1_logical_asap_optimization(&per_computation).collect(); + let stage1 = stage1_logical_asap_optimization(&per_computation, recurrence).collect(); run_stage2_and_stage3(per_computation, stage1, targets, recurrence, data, models) } @@ -407,6 +534,7 @@ pub fn run_stage2_and_stage3( id: id.clone(), from_logical: format!("L{}", of.from + 1), summaries: of.summaries, + panes: of.panes, shared: of.shared, }); } @@ -565,11 +693,7 @@ fn display_name( } ComputationCandidate::Summary(algorithm) | ComputationCandidate::WholeExpression(algorithm) => { - sketches.push(match algorithm { - SketchAlgorithm::CmsWithHeap => "CMS+heap".to_string(), - SketchAlgorithm::CountSketchWithHeap => "CountSketch+heap".to_string(), - other => format!("{other:?}"), - }) + sketches.push(sketch_name(algorithm)) } } } @@ -588,6 +712,15 @@ fn display_name( .join(" · ") } +/// A sketch algorithm's display name, e.g. "CMS+heap" or "Kll". +fn sketch_name(algorithm: &SketchAlgorithm) -> String { + match algorithm { + SketchAlgorithm::CmsWithHeap => "CMS+heap".to_string(), + SketchAlgorithm::CountSketchWithHeap => "CountSketch+heap".to_string(), + other => format!("{other:?}"), + } +} + /// The planner pipeline behind the optimization-pass interface: the /// workload's roots in entry order, PromQL roots with each series' full /// identity as a column (the row representation per-series state needs at diff --git a/crates/asap-aware-mapping/src/per_computation_candidates.rs b/crates/asap-aware-mapping/src/per_computation_candidates.rs index 4f9f4787c..28880a6e3 100644 --- a/crates/asap-aware-mapping/src/per_computation_candidates.rs +++ b/crates/asap-aware-mapping/src/per_computation_candidates.rs @@ -77,6 +77,7 @@ use std::collections::{HashMap, HashSet}; use std::rc::Rc; use asap_types::ir::operator_properties::{BinaryOpKind, JoinKind, Reduction, Source}; +use asap_types::ir::pane_chain::{merged_chain, whole_window_build}; use asap_types::ir::{ ASAPOp, BinaryOperator, ExprSemantics, NonASAPOp, Operator, OperatorNode, OperatorResultKind, Predicate, ProjectItem, QueryRoot, ScalarExpr, SchemaDerivationError, @@ -86,9 +87,9 @@ use asap_types::post_asap::guarantee::{ ProbabilityExpr, }; use asap_types::post_asap::{ - EntityIdentity, ExactKind, ExactParams, FieldDataType, GroupingStrategy, Materialization, - NonNegativeWeightProof, SketchAlgorithm, SketchKind, SketchParams, SketchStatistic, - SummaryInputExpr, SummaryUpdate, WeightDomain, + EntityIdentity, ExactKind, ExactParams, FamilyCapability, FieldDataType, GroupingStrategy, + Materialization, MergedError, NonNegativeWeightProof, SketchAlgorithm, SketchKind, + SketchParams, SketchStatistic, SummaryInputExpr, SummaryUpdate, WeightDomain, }; use asap_types::pre_asap::expr_ir::ArithmeticOpKind; use asap_types::pre_asap::{ @@ -838,10 +839,15 @@ pub(crate) fn approximate_inputs(root: &QueryRoot) -> Vec> { .filter(|node| { matches!( node.asap(), - Some(ASAPOp::SummaryAgg { - family: FieldDataType::Sketch(..), - .. - }) + Some( + ASAPOp::SummaryAgg { + family: FieldDataType::Sketch(..), + .. + } | ASAPOp::PaneChain { + family: FieldDataType::Sketch(..), + .. + } + ) ) }) .filter(|node| seen.insert(Rc::as_ptr(node))) @@ -884,10 +890,16 @@ pub(crate) fn with_resized_summaries( .iter() .any(|child| !Rc::ptr_eq(child, &memo[&Rc::as_ptr(child)])); let mut operator = node.operator.clone(); - if let Operator::ASAP(ASAPOp::SummaryAgg { - family: FieldDataType::Sketch(kind, _), - .. - }) = &mut operator + if let Operator::ASAP( + ASAPOp::SummaryAgg { + family: FieldDataType::Sketch(kind, _), + .. + } + | ASAPOp::PaneChain { + family: FieldDataType::Sketch(kind, _), + .. + }, + ) = &mut operator { if let Some(params) = resize(node, kind.params()).filter(|p| p != kind.params()) { *kind = SketchKind::new(kind.algorithm().clone(), params); @@ -941,7 +953,8 @@ pub(crate) fn with_resized_summaries( /// distinct bound gives its failure probability. `None` for a state over /// computed rows or several sources. pub(crate) fn summary_source(state: &OperatorNode) -> Option { - let Some(ASAPOp::SummaryAgg { child, .. }) = state.asap() else { + let Some(ASAPOp::SummaryAgg { child, .. } | ASAPOp::PaneChain { child, .. }) = state.asap() + else { return None; }; source_scan(child)?; @@ -1098,6 +1111,9 @@ fn with_guarantees( /// /// [`AccuracyScope::PerValue`]: asap_types::types::AccuracyScope::PerValue fn composed_guarantee(node: &OperatorNode) -> Option { + if let Some(guarantee) = merged_panes_guarantee(node) { + return guarantee; + } let exact = |node: &OperatorNode| { node.guarantee .as_ref() @@ -1243,6 +1259,66 @@ fn composed_guarantee(node: &OperatorNode) -> Option { } } +/// The guarantee of an estimate or finalized value read from merged +/// tumbling panes ([`merged_chain`]): the guarantee of the same read of one +/// build over the panes' whole window ([`whole_window_build`]) when the +/// family's merged error for that read is exact or the same as that build's +/// (the family-capability table); none when it is approximate (evidence +/// only, for plan selection to judge) or the family has no merge. `None` for +/// any node that does not read merged panes. +fn merged_panes_guarantee(node: &OperatorNode) -> Option> { + let (state, merged) = match node.asap()? { + ASAPOp::SummaryEstimate { + summary_input, + query, + } => { + let family = merged_chain(summary_input)?.asap()?.produced_state()?; + ( + summary_input, + FamilyCapability::of(family).merged_error(query), + ) + } + ASAPOp::FinalizeExactAccumulator { child } => { + let family = merged_chain(child)?.asap()?.produced_state()?; + (child, FamilyCapability::of(family).merge.map(|m| m.error)) + } + _ => return None, + }; + if !matches!( + merged, + Some(MergedError::Exact | MergedError::SameAsUnionBuild) + ) { + return Some(None); + } + let chain = merged_chain(state)?; + let Ok(mut whole) = whole_window_build(chain) else { + return Some(None); + }; + // The whole window's range over the chain's input carries the guarantee + // composed over that input. + let ASAPOp::PaneChain { child: input, .. } = chain.asap()? else { + return Some(None); + }; + if let Operator::ASAP(ASAPOp::SummaryAgg { child: range, .. }) = &mut whole.operator { + let mut timed = (**range).clone(); + timed.guarantee = composed_guarantee(&timed); + debug_assert!(Rc::ptr_eq(timed.children()[0], input)); + *range = Rc::new(timed); + } + let whole = Rc::new(whole); + let reader = OperatorNode::with_schema( + node.operator.map_children(|child| { + if Rc::ptr_eq(child, state) { + Rc::clone(&whole) + } else { + Rc::clone(child) + } + }), + node.schema.clone(), + ); + Some(composed_guarantee(&reader)) +} + /// The guarantee of a distinct count of one instance per group over a /// source's own rows, whose failure probability is left symbolic in the /// source's distinct bound, which Stage 1 does not read: diff --git a/crates/asap-aware-mapping/src/stage3_plan_selection.rs b/crates/asap-aware-mapping/src/stage3_plan_selection.rs index f277ff444..730ec52c5 100644 --- a/crates/asap-aware-mapping/src/stage3_plan_selection.rs +++ b/crates/asap-aware-mapping/src/stage3_plan_selection.rs @@ -53,7 +53,12 @@ //! Prices come from [`crate::analytical_cost::estimate_operator`] over edge //! statistics derived from the [`DataWorkload`] and a fixed default group //! count; summary build and estimation are priced as rows × sketch depth and -//! groups × k. Kept state is sized by its bytes: a sketch by its parameters, a +//! groups × k. A query-time scan reads the longest window above it (a time +//! shift moves a window without widening it); a time shift is free, and a +//! time range is priced by the rows it keeps. A tumbling-pane chain is +//! priced as one build over its whole window plus one operation per row to +//! place it in its pane, and keeps one state per group and pane; a merge +//! costs one operation per state it reads. Kept state is sized by its bytes: a sketch by its parameters, a //! fixed-size exact accumulator (sum, count, min, max, rate, ...) as one //! value per group, and exact state that grows with the data (quantile, //! top-k, distinct count, L2, entropy keep every value or item) as one value @@ -74,7 +79,7 @@ use asap_types::ir::physical_export::{ }; use asap_types::ir::{ ASAPOp, BinaryOperator, NonASAPOp, Operator, OperatorNode, OperatorResultKind, QueryRoot, - ScalarExpr, SchemaDerivationError, + ScalarExpr, SchemaDerivationError, TimeRangeKind, }; use asap_types::post_asap::sketch::KLL_MAX_K; use asap_types::post_asap::ExecutionDataStateError; @@ -361,6 +366,13 @@ fn at_most_one_row(node: &OperatorNode) -> bool { .any(|m| matches!(m, AggIntent::TopK { .. } | AggIntent::CountValues { .. })) } Operator::ASAP(ASAPOp::SummaryAgg { reduction, .. }) => global(reduction), + // A merge gives one state per group, whatever the panes it merges. + Operator::ASAP(ASAPOp::SummaryMerge { .. }) => matches!( + node.summary_build(), + Some( + ASAPOp::SummaryAgg { reduction, .. } | ASAPOp::PaneChain { reduction, .. } + ) if global(reduction) + ), Operator::ASAP(ASAPOp::SummaryEstimate { summary_input, query, @@ -506,7 +518,10 @@ fn accuracy_violation( .iter() .flat_map(|node| OperatorNode::reachable(node)) { - let Operator::ASAP(ASAPOp::SummaryAgg { family, input, .. }) = &node.operator else { + let Operator::ASAP( + ASAPOp::SummaryAgg { family, input, .. } | ASAPOp::PaneChain { family, input, .. }, + ) = &node.operator + else { continue; }; if matches!(family, FieldDataType::Sketch(kind, _) @@ -606,7 +621,9 @@ pub fn with_confirmed_weights(roots: &[QueryRoot], data: &DataWorkload) -> Vec match operator { NonASAPOp::Scan { .. } => { // At ingestion time, one second of arriving rows; at - // query time, what its time range keeps. - let lookback = dag - .edges - .iter() - .filter(|e| e.producer == node.id) - .filter_map(|e| match &nodes[&e.consumer].payload { - Payload::NonASAP(NonASAPOp::TimeRange { range, .. }) => { - Some(range.as_millis() as u64) - } - _ => None, - }) + // query time, the longest window read above it. + let lookback = windows_read(dag, &nodes, node.id) + .into_iter() .max() .unwrap_or(DEFAULT_LOOKBACK_MS); let lookback = if ingestion { 1_000 } else { lookback }; @@ -1281,18 +1290,55 @@ fn price( ); (out, estimate, format!("limit to {} rows", out.rows)) } - other => { + NonASAPOp::TimeShift { .. } => ( + input, + estimate_operator( + PhysicalOperator::TimeShift, + OperatorStatistics::PassThrough { + edges: unary(input), + }, + ), + format!("time shift: pass {} rows, free", input.rows), + ), + NonASAPOp::TimeRange { range, kind, .. } => { + // A range keeps its window's samples; an instant + // selector the latest sample of each series. + let kept = match kind { + TimeRangeKind::Range => { + (shape.rows_per_ms * range.as_millis() as f64).round() as u64 + } + TimeRangeKind::Instant => shape.series, + }; + let out = edge(input.rows.min(kept.max(1))); + let out = EdgeStatistics { + rows: out.rows, + bytes: out.bytes.min(input.bytes), + }; + let estimate = estimate_operator( + PhysicalOperator::TimeRange, + OperatorStatistics::PassThrough { edges: unary(out) }, + ); + ( + out, + estimate, + format!( + "time range {range:?}: keep {} of {} rows", + out.rows, input.rows + ), + ) + } + _ => { let estimate = estimate_operator( PhysicalOperator::PassThrough, OperatorStatistics::PassThrough { edges: unary(input), }, ); - let name = match other { - NonASAPOp::TimeRange { range, .. } => format!("time range {range:?}"), - _ => "operator".into(), - }; - (input, estimate, format!("{name}: pass {} rows", input.rows)) + ( + input, + estimate, + format!("operator: pass {} rows", input.rows), + ) } }, Payload::ASAP(ASAPOp::SummaryAgg { @@ -1315,6 +1361,62 @@ fn price( ), ) } + Payload::ASAP(ASAPOp::PaneChain { + family, + reduction, + pane_width_ms, + pane_count, + .. + }) => { + // Each input row is kept by the one pane its time falls in, + // as a time range keeps it (one operation), and updates + // that pane. + let group_count = groups(reduction); + let (depth, state_bytes) = summary_shape(family); + let states = group_count * u64::from(*pane_count); + let out = EdgeStatistics { + rows: states, + bytes: states * state_bytes, + }; + let ops = input.rows as f64 * (depth + 1.0); + ( + out, + Ok(ResourceEstimate::new(ops, out.bytes, 0)), + format!( + "build {} in {pane_count} panes of {pane_width_ms} ms for \ + {group_count} groups: {} rows x (1 + depth {depth})", + family_name(family), + input.rows + ), + ) + } + Payload::ASAP(ASAPOp::SummaryMerge { .. }) => { + // One operation per input state; one state per group out, + // each pane of a chain being a state of its group. + let producers = dag.edges.iter().filter(|e| e.consumer == node.id); + let mut states = 0; + let mut group_count = 0; + for edge in producers { + let rows = output[&edge.producer].rows; + let panes = match &nodes[&edge.producer].payload { + Payload::ASAP(ASAPOp::PaneChain { pane_count, .. }) => { + u64::from(*pane_count) + } + _ => 1, + }; + states += rows; + group_count = group_count.max(rows / panes.max(1)); + } + let out = EdgeStatistics { + rows: group_count, + bytes: input.bytes.div_ceil(input.rows.max(1)) * group_count, + }; + ( + out, + Ok(ResourceEstimate::new(states as f64, out.bytes, 0)), + format!("merge {states} states into {group_count}"), + ) + } Payload::ASAP(ASAPOp::SummaryEstimate { query, .. }) => { let per_group = match query { SketchStatistic::TopK { k } => *k as u64, @@ -1383,6 +1485,39 @@ fn price( }) } +/// The windows, in milliseconds, read above the scan `scan` at query time: +/// each range `TimeRange` and `PaneChain` (its whole window) reached +/// through time shifts, which move a window without widening it. +fn windows_read( + dag: &PhysicalASAPDAG, + nodes: &HashMap, + scan: PhysicalASAPNodeId, +) -> Vec { + let mut windows = Vec::new(); + let mut stack = vec![scan]; + let mut seen = HashSet::new(); + while let Some(id) = stack.pop() { + if !seen.insert(id) { + continue; + } + for edge in dag.edges.iter().filter(|e| e.producer == id) { + match &nodes[&edge.consumer].payload { + Payload::NonASAP(NonASAPOp::TimeRange { range, .. }) => { + windows.push(range.as_millis() as u64) + } + Payload::ASAP(ASAPOp::PaneChain { + pane_width_ms, + pane_count, + .. + }) => windows.push(pane_width_ms.saturating_mul(u64::from(*pane_count))), + Payload::NonASAP(NonASAPOp::TimeShift { .. }) => stack.push(edge.consumer), + _ => {} + } + } + } + windows +} + /// `input` split as evenly as integers allow into `partitions` parts. fn split(input: EdgeStatistics, partitions: u64) -> PartitionStatistics { let part = |total: u64, i: u64| total / partitions + u64::from(i < total % partitions); @@ -3243,6 +3378,51 @@ mod tests { .dag } + /// The physical DAG of `query`'s first per-computation candidates, + /// with nothing materialized. + fn first_candidate_dag(query: &str) -> PhysicalASAPDAG { + let root = lower_promql(query, RequestedAccuracy::exact()); + let inventory = crate::per_computation_candidates::generate_per_computation_candidates( + vec![(0, QueryRoot::Operator(root))], + ) + .unwrap(); + let choice = vec![0; inventory.targets.len()]; + let roots: Vec<_> = + crate::per_computation_candidates::compose_logical_candidate(&inventory, &choice) + .unwrap() + .into_iter() + .map(|(_, root)| root) + .collect(); + optimize_physical_asap("L1", &roots).unwrap().dag + } + + /// A time shift is free and does not change what the scan below it + /// reads: the scan reads the window above the shift, as without it. A + /// time range is priced by the rows it keeps. + #[test] + fn time_shift_is_free_and_the_scan_reads_the_shifted_window() { + let every_minute = [repeating(60_000)]; + let plain = first_candidate_dag("sum_over_time(m[5m])"); + let shifted = first_candidate_dag("sum_over_time(m[5m] offset 1h)"); + let (plain_cost, shifted_cost) = ( + priced(&plain, &every_minute), + priced(&shifted, &every_minute), + ); + let cost_of = |dag: &PhysicalASAPDAG, cost: &CandidateCost, pick: fn(&Payload) -> bool| { + cost.per_node[&node_of(dag, pick)].cost + }; + let is_shift = |p: &Payload| matches!(p, Payload::NonASAP(NonASAPOp::TimeShift { .. })); + let is_range = |p: &Payload| matches!(p, Payload::NonASAP(NonASAPOp::TimeRange { .. })); + assert_eq!(cost_of(&shifted, &shifted_cost, is_shift), 0.0); + assert!(close( + cost_of(&shifted, &shifted_cost, is_scan), + cost_of(&plain, &plain_cost, is_scan) + )); + assert!(close(shifted_cost.total, plain_cost.total)); + let range = &plain_cost.per_node[&node_of(&plain, is_range)]; + assert!(range.detail.contains("keep"), "{}", range.detail); + } + const AT_INGESTION: Materialization = Materialization::MatAtIngestion(asap_types::ir::Medium::Memory); const AT_QUERY: Materialization = Materialization::MatAtQuery(asap_types::ir::Medium::Memory); diff --git a/crates/asap-physical-operators/src/operators/mod.rs b/crates/asap-physical-operators/src/operators/mod.rs index 10cd1303f..c4a0036bf 100644 --- a/crates/asap-physical-operators/src/operators/mod.rs +++ b/crates/asap-physical-operators/src/operators/mod.rs @@ -209,7 +209,9 @@ impl Operator { ) } - pub(crate) fn with_counter_lookback(mut self, lookback: i64) -> Result { + /// Set a counter evaluation's logical window: `lookback` long, ending + /// `offset` before the evaluation time. + pub(crate) fn with_counter_window(mut self, offset: i64, lookback: i64) -> Result { if lookback <= 0 { return Err(invalid("counter lookback must be positive")); } @@ -219,6 +221,7 @@ impl Operator { } = &mut self.kind { evaluation.lookback_ms = Some(lookback); + evaluation.offset_ms = offset; } Ok(self) } @@ -232,6 +235,7 @@ impl Operator { query: SummaryEvaluation::Exact(crate::summary_kernels::exact::ExactEvaluation { lookback_ms: Some(lookback), + offset_ms, .. }), .. @@ -244,7 +248,9 @@ impl Operator { evaluation_time_ms, .. } => evaluation_time_ms, crate::runtime::Scope::Ingestion { window_end_ms, .. } => window_end_ms, - }; + } + .checked_sub(*offset_ms) + .ok_or_else(|| invalid("counter window overflows Int64"))?; let start = end .checked_sub(*lookback) .ok_or_else(|| invalid("counter window overflows Int64"))?; diff --git a/crates/asap-physical-operators/src/physical_planner/mod.rs b/crates/asap-physical-operators/src/physical_planner/mod.rs index 3b0612bbf..cf1bd83af 100644 --- a/crates/asap-physical-operators/src/physical_planner/mod.rs +++ b/crates/asap-physical-operators/src/physical_planner/mod.rs @@ -132,6 +132,19 @@ fn compile_internal( roots: &[NodeId], ) -> Result { preflight_depth(dag)?; + // A pane chain stands for its panes; the deployment binds each pane's + // raw input, so it runs only once expanded. + if let Some(node) = dag + .nodes + .iter() + .find(|n| matches!(n.payload, Payload::ASAP(ASAPOp::PaneChain { .. }))) + { + return Err(invalid(format!( + "node {}: a PaneChain runs as its panes; expand it with \ + `asap_types::ir::pane_chain::expand_pane_chains` before compiling", + node.id + ))); + } // Helper IDs lie above the u32 range; a larger Planner ID could collide. if let Some(node) = dag.nodes.iter().find(|n| n.id as u64 > u64::from(u32::MAX)) { return Err(invalid(format!("Planner node ID {} exceeds u32", node.id))); @@ -570,29 +583,8 @@ fn compile_internal( let mut operator = compile_node(node, &schemas) .map_err(|error| invalid(format!("node {id}: {error}")))?; if operator.is_counter_evaluation() { - let mut pending = vec![id]; - let mut visited = BTreeSet::new(); - let mut ranges = BTreeSet::new(); - while let Some(ancestor) = pending.pop() { - if !visited.insert(ancestor) { - continue; - } - if let Payload::NonASAP(NonASAPOp::TimeRange { range, .. }) = - &nodes[&ancestor].payload - { - ranges.insert( - i64::try_from(range.as_millis()) - .map_err(|_| invalid("counter lookback exceeds Int64"))?, - ); - continue; - } - pending.extend(dependencies.get(&ancestor).into_iter().flatten().copied()); - } - if ranges.len() > 1 { - return Err(invalid("counter evaluation has ambiguous logical windows")); - } - if let Some(lookback) = ranges.into_iter().next() { - operator = operator.with_counter_lookback(lookback)?; + if let Some((offset, lookback)) = counter_window(id, &nodes, &dependencies)? { + operator = operator.with_counter_window(offset, lookback)?; } } if temporal_evaluation_drops_name(node) { @@ -607,6 +599,64 @@ fn compile_internal( Ok(physical_dag) } +/// The logical window of the counter evaluation `id`, as `(offset, +/// lookback)`: it ends `offset` ms before the evaluation time and spans +/// `lookback` ms. It is the union of the range windows the evaluation +/// reads, each moved back by the time shifts below its range: one range for +/// a single build, back-to-back panes for merged tumbling panes. `None` +/// without a range; an error when the ranges do not form one window. +fn counter_window( + id: NodeId, + nodes: &BTreeMap, + dependencies: &BTreeMap>, +) -> Result, Error> { + let millis = + |ms: u128| i64::try_from(ms).map_err(|_| invalid("counter lookback exceeds Int64")); + let mut pending = vec![id]; + let mut visited = BTreeSet::new(); + // (offset, end of the window back from the evaluation time) per range. + let mut windows = BTreeSet::new(); + while let Some(ancestor) = pending.pop() { + if !visited.insert(ancestor) { + continue; + } + if let Payload::NonASAP(NonASAPOp::TimeRange { range, .. }) = &nodes[&ancestor].payload { + let mut offset = 0i64; + let mut below = dependencies.get(&ancestor).and_then(|d| d.first()).copied(); + while let Some(input) = below { + let Payload::NonASAP(NonASAPOp::TimeShift { shift, .. }) = &nodes[&input].payload + else { + break; + }; + if shift.at.is_none() { + offset = offset + .checked_add(shift.offset_ms) + .ok_or_else(|| invalid("counter window overflows Int64"))?; + } + below = dependencies.get(&input).and_then(|d| d.first()).copied(); + } + let back = offset + .checked_add(millis(range.as_millis())?) + .ok_or_else(|| invalid("counter window overflows Int64"))?; + windows.insert((offset, back)); + continue; + } + pending.extend(dependencies.get(&ancestor).into_iter().flatten().copied()); + } + let mut windows = windows.into_iter(); + let Some((offset, mut back)) = windows.next() else { + return Ok(None); + }; + // Back-to-back windows, newest first, form one window. + for (start, end) in windows { + if start != back { + return Err(invalid("counter evaluation has ambiguous logical windows")); + } + back = end; + } + Ok(Some((offset, back - offset))) +} + // Temporal summary evaluations produce PromQL vectors, whose range functions drop // the metric name before matching/filtering. Stored state retains its full identity. fn temporal_evaluation_drops_name(node: &PhysicalASAPDAGNode) -> bool { @@ -773,6 +823,7 @@ fn bind_operation(node: &PhysicalASAPDAGNode, inputs: &[SchemaRef]) -> Result for ExactAccumulator { } /// Planned evaluation of an exact summary. `lookback_ms` is the logical PromQL -/// counter window; the evaluation range is resolved from it at run time. +/// counter window, ending `offset_ms` before the evaluation time (PromQL +/// `offset`); the evaluation range is resolved from them at run time. #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] pub struct ExactEvaluation { pub statistic: Statistic, #[serde(default, skip_serializing_if = "Option::is_none")] pub lookback_ms: Option, + #[serde(default, skip_serializing_if = "is_zero")] + pub offset_ms: i64, +} + +fn is_zero(ms: &i64) -> bool { + *ms == 0 } impl ExactAccumulator { diff --git a/crates/asap-physical-operators/tests/physical_dag.rs b/crates/asap-physical-operators/tests/physical_dag.rs index e7a981f97..9252c4a43 100644 --- a/crates/asap-physical-operators/tests/physical_dag.rs +++ b/crates/asap-physical-operators/tests/physical_dag.rs @@ -155,6 +155,7 @@ fn summary_construction_merge_and_evaluation_at_both_phases() { asap_physical_operators::summary_kernels::exact::ExactEvaluation { statistic: Statistic::Sum, lookback_ms: None, + offset_ms: 0, }, ), ) @@ -474,6 +475,7 @@ fn exact_state_and_family_validation() { asap_physical_operators::summary_kernels::exact::ExactEvaluation { statistic: Statistic::Sum, lookback_ms: None, + offset_ms: 0, }, ), ) @@ -599,6 +601,7 @@ fn empty_exact_count_is_an_integer_state_evaluation() { asap_physical_operators::summary_kernels::exact::ExactEvaluation { statistic: Statistic::Count, lookback_ms: None, + offset_ms: 0, }, ), ) diff --git a/crates/asap-physical-operators/tests/physical_semantics.rs b/crates/asap-physical-operators/tests/physical_semantics.rs index 627a14421..88c6cd2a6 100644 --- a/crates/asap-physical-operators/tests/physical_semantics.rs +++ b/crates/asap-physical-operators/tests/physical_semantics.rs @@ -853,6 +853,7 @@ fn empty_exact_summary_extrema_agree_with_ordinary_aggregation() { asap_physical_operators::summary_kernels::exact::ExactEvaluation { statistic, lookback_ms: None, + offset_ms: 0, }, ), ) diff --git a/crates/devtools/src/bin/variant_coverage.rs b/crates/devtools/src/bin/variant_coverage.rs index 7a2a848d6..c1a21de66 100644 --- a/crates/devtools/src/bin/variant_coverage.rs +++ b/crates/devtools/src/bin/variant_coverage.rs @@ -47,6 +47,7 @@ const OPERATOR_VARIANTS: &[&str] = &[ "MaintainPopulation", "EvaluatePopulation", "SummaryMerge", + "PaneChain", "SummarySubtract", "SummaryDelete", "SummaryJoin", diff --git a/crates/devtools/src/planning_stages.rs b/crates/devtools/src/planning_stages.rs index 869915abc..e1d7281c7 100644 --- a/crates/devtools/src/planning_stages.rs +++ b/crates/devtools/src/planning_stages.rs @@ -153,7 +153,7 @@ pub fn run_planning_stages_over( // Count Stage 1 candidates as they are enumerated and stop as soon as // the count passes the limit; never truncate. let mut stage1 = Vec::new(); - for candidate in stage1_logical_asap_optimization(&per_computation) { + for candidate in stage1_logical_asap_optimization(&per_computation, recurrence) { if max_combinations.is_some_and(|limit| stage1.len() == limit) { return Err(PlanningStagesError::TooManyCandidates { limit: stage1.len(), diff --git a/crates/devtools/tests/stage_pipeline.rs b/crates/devtools/tests/stage_pipeline.rs index c8cdda2e7..103b3e663 100644 --- a/crates/devtools/tests/stage_pipeline.rs +++ b/crates/devtools/tests/stage_pipeline.rs @@ -141,9 +141,10 @@ fn display_cap_is_recorded_and_keeps_the_selection() { let document = generate(&["--max-displayed", "1"]); let logical = &document["stage1_logical_asap_optimization"]; assert_eq!(logical["capped"], true); - assert!(logical["candidates"].as_array().unwrap().len() < 9); - // 3 Pass 1 candidates, each with 2 Pass 2 candidates. - assert_eq!(logical["combinations"], 9); + assert!(logical["candidates"].as_array().unwrap().len() < 27); + // 3 Pass 1 candidates, each with 8 Pass 2 candidates: shared inputs, + // tumbling panes, and both. + assert_eq!(logical["combinations"], 27); assert_eq!( document["stage3_plan_selection"]["selected"], full["stage3_plan_selection"]["selected"] @@ -357,10 +358,10 @@ fn workload_above_the_candidate_limit_is_rejected() { ); } // At the limit, it plans every candidate. - let document = generate(&["--max-combinations", "9"]); + let document = generate(&["--max-combinations", "27"]); assert_eq!( document["stage1_logical_asap_optimization"]["combinations"], - 9 + 27 ); } @@ -389,11 +390,11 @@ fn default_candidate_limit_is_ten_thousand() { fn planning_stages_without_a_limit_plan_every_candidate() { let workload = example1(); let run = run_planning_stages(&workload, lower_promql_roots(&workload).unwrap(), None).unwrap(); - assert_eq!(run.stage1_logical_asap_optimization.len(), 9); - let limited = run_planning_stages(&workload, lower_promql_roots(&workload).unwrap(), Some(8)); + assert_eq!(run.stage1_logical_asap_optimization.len(), 27); + let limited = run_planning_stages(&workload, lower_promql_roots(&workload).unwrap(), Some(26)); assert!(matches!( limited, - Err(PlanningStagesError::TooManyCandidates { limit: 8 }) + Err(PlanningStagesError::TooManyCandidates { limit: 26 }) )); } diff --git a/crates/devtools/tests/viewer_contract.rs b/crates/devtools/tests/viewer_contract.rs index fa64bec2d..09f2b9862 100644 --- a/crates/devtools/tests/viewer_contract.rs +++ b/crates/devtools/tests/viewer_contract.rs @@ -201,6 +201,16 @@ fn asap_samples() -> Vec> { evaluation: PopulationStatistic::Sum, }, ASAPOp::SummaryMerge { children: vec![] }, + ASAPOp::PaneChain { + child: (), + family: family.clone(), + input: SummaryUpdate::column(ColumnRef::SampleValue), + reduction: Reduction::by(vec![]), + grouping: GroupingStrategy::default(), + filter: None, + pane_width_ms: 60_000, + pane_count: 5, + }, ASAPOp::SummarySubtract { left: (), right: (), @@ -228,6 +238,7 @@ fn asap_samples() -> Vec> { | ASAPOp::MaintainPopulation { .. } | ASAPOp::EvaluatePopulation { .. } | ASAPOp::SummaryMerge { .. } + | ASAPOp::PaneChain { .. } | ASAPOp::SummarySubtract { .. } | ASAPOp::SummaryDelete { .. } | ASAPOp::SummaryJoin { .. } diff --git a/crates/integration-tests/tests/planner_layering_common/mod.rs b/crates/integration-tests/tests/planner_layering_common/mod.rs index 7f5712d55..02a496750 100644 --- a/crates/integration-tests/tests/planner_layering_common/mod.rs +++ b/crates/integration-tests/tests/planner_layering_common/mod.rs @@ -6,7 +6,7 @@ //! `asap_devtools::planning_stages::run_planning_stages`, the pipeline //! `stage_pipeline` also runs; the example workloads come from //! `asap_devtools::planner_layering_examples`. The functions under "Pending adapters" read properties the IR -//! cannot express yet (window summaries, retention). They return today's +//! cannot express yet (sliding and EH window summaries, retention). They return today's //! only possible answer; the implementer of each feature replaces the body //! with a read of the new IR. Tests that depend on them are `#[ignore]`d //! with the feature. @@ -312,6 +312,9 @@ pub fn is_summary(payload: &Payload) -> bool { ASAPOp::SummaryAgg { family: FieldDataType::Sketch(..), .. + } | ASAPOp::PaneChain { + family: FieldDataType::Sketch(..), + .. } | ASAPOp::SummaryEstimate { .. } | ASAPOp::SummaryMerge { .. } ) @@ -322,16 +325,22 @@ pub fn is_merge(payload: &Payload) -> bool { matches!(payload, Operator::ASAP(ASAPOp::SummaryMerge { .. })) } -/// The sketch build nodes (`SummaryAgg` over a sketch family) of `dag`, -/// with their algorithm and parameters. +/// The sketch build nodes (`SummaryAgg` or tumbling-pane `PaneChain` over a +/// sketch family) of `dag`, with their algorithm and parameters. pub fn sketch_builds(dag: &impl ExportedDag) -> Vec<(NodeId, SketchAlgorithm, SketchParams)> { dag.node_ids() .into_iter() .filter_map(|id| match dag.payload(id) { - Operator::ASAP(ASAPOp::SummaryAgg { - family: FieldDataType::Sketch(kind, _), - .. - }) => Some((id, kind.algorithm().clone(), kind.params().clone())), + Operator::ASAP( + ASAPOp::SummaryAgg { + family: FieldDataType::Sketch(kind, _), + .. + } + | ASAPOp::PaneChain { + family: FieldDataType::Sketch(kind, _), + .. + }, + ) => Some((id, kind.algorithm().clone(), kind.params().clone())), _ => None, }) .collect() @@ -600,10 +609,17 @@ pub enum WindowForm { ExponentialHistogram { horizon_ms: u64 }, } -/// Pending (needs Pass 2 window composition, #601/#628): the IR has no -/// window summary yet, so every build is rebuilt from its query window. -pub fn window_form(_dag: &impl ExportedDag, _build: NodeId) -> WindowForm { - WindowForm::None +/// The window summary of a build: a `PaneChain` keeps back-to-back panes of +/// its pane width (tumbling); a `SummaryAgg` is rebuilt from its query +/// window. Sliding windows and Exponential Histograms are not planned yet +/// (#628). +pub fn window_form(dag: &impl ExportedDag, build: NodeId) -> WindowForm { + match dag.payload(build) { + Operator::ASAP(ASAPOp::PaneChain { pane_width_ms, .. }) => WindowForm::Tumbling { + length_ms: *pane_width_ms, + }, + _ => WindowForm::None, + } } /// Pending (needs retention in the physical DAG): how long a materialized diff --git a/crates/integration-tests/tests/planner_layering_example1.rs b/crates/integration-tests/tests/planner_layering_example1.rs index f2c62a2b0..ed9c8e2cf 100644 --- a/crates/integration-tests/tests/planner_layering_example1.rs +++ b/crates/integration-tests/tests/planner_layering_example1.rs @@ -6,11 +6,15 @@ //! yet are `#[ignore]`d with the PR or issue that delivers it. //! //! Scope: logical ASAP-aware optimization = Pass 1 and Pass 2's -//! identical-expression rule (no window composition); physical ASAP-aware -//! optimization = operator implementation with every sub-DAG -//! `NotMaterialized`. Pass 1 gives 3 candidates; Pass 2 adds, for each, one -//! sharing the scan and one sharing the scan and the range selector: 9 → 9 → -//! 1, a subset of the doc's 1 → 54 → 156 → 1. +//! identical-expression and window-composition rules (tumbling panes only); +//! physical ASAP-aware optimization = operator implementation with every +//! sub-DAG `NotMaterialized`. Pass 1 gives 3 candidates; Pass 2 adds, for +//! each, one sharing the scan and one sharing the scan and the range +//! selector, and the tumbling-pane forms of Q1's rate and of Q2's option +//! (each alone or both, each also with a shared scan): 27 → 27 → 1, a subset +//! of the doc's 1 → 54 → 156 → 1. Tests about Pass 1 and the +//! identical-expression rule read the candidates with whole windows +//! ([`whole_windows`]). mod planner_layering_common; @@ -53,10 +57,16 @@ fn sketch_options(dag: &impl ExportedDag, nodes: &HashSet) -> BTreeSet Some(match (grouping, kind.algorithm()) { + Operator::ASAP( + ASAPOp::SummaryAgg { + family: FieldDataType::Sketch(kind, grouping), + .. + } + | ASAPOp::PaneChain { + family: FieldDataType::Sketch(kind, grouping), + .. + }, + ) => Some(match (grouping, kind.algorithm()) { ( GroupingStrategy::SharedMultiSubpopulation { kind: HydraKind::HydraCms, @@ -80,6 +90,14 @@ fn sketch_options(dag: &impl ExportedDag, nodes: &HashSet) -> BTreeSet bool { + dag.node_ids() + .into_iter() + .all(|id| !matches!(dag.payload(id), Operator::ASAP(ASAPOp::PaneChain { .. }))) +} + fn roots(query_roots: &[NodeId]) -> (NodeId, NodeId) { assert_eq!(query_roots.len(), 2, "every candidate covers Q1 and Q2"); (query_roots[0], query_roots[1]) @@ -95,13 +113,14 @@ fn classify(dag: &impl ExportedDag, query_roots: &[NodeId]) -> (Q2Option, bool) (option, !c1.is_disjoint(&c2)) } -/// The candidate with Q2 `option` whose queries share no node (Pass 2 adds -/// shared-input variants of each). +/// The candidate with Q2 `option` whose queries share no node and whose +/// summaries are built over whole windows (Pass 2 adds shared-input and +/// tumbling-pane variants of each). fn physical_with(run: &Run, option: Q2Option) -> &Physical { let mut found = run .physical .iter() - .filter(|p| classify(p.dag(), &p.query_roots) == (option, false)); + .filter(|p| whole_windows(p.dag()) && classify(p.dag(), &p.query_roots) == (option, false)); let p = found.next().unwrap_or_else(|| panic!("no {option:?}")); assert!(found.next().is_none(), "one {option:?} candidate"); p @@ -165,13 +184,14 @@ fn stage0_query_language_frontends_queries_do_not_share_nodes() { /// Pass 1 gives 1 × 3 = 3 candidates without a shared input: Q2's top-k is /// exact, Count-Min + heap or CountSketch + heap. (Pass 2 adds shared-input -/// variants of each.) +/// and tumbling-pane variants of each.) #[test] fn stage1_logical_asap_optimization_has_three_pass1_candidates() { let run = pipeline(); let found: Vec<_> = run .logical .iter() + .filter(|c| whole_windows(&c.dag)) .map(|c| classify(&c.dag, &c.query_roots)) .filter(|(_, shared)| !shared) .collect(); @@ -181,16 +201,18 @@ fn stage1_logical_asap_optimization_has_three_pass1_candidates() { assert_eq!(sorted, expected, "each Q2 option exactly once: {found:?}"); } -/// Q1 is exact in every candidate: no summary is reachable from its root. +/// Q1 is exact in every candidate: no sketch build or estimate is reachable +/// from its root (its rate may be merged from exact tumbling panes). #[test] fn stage1_logical_asap_optimization_q1_is_always_exact() { let run = pipeline(); for c in &run.logical { let (q1, _) = roots(&c.query_roots); assert!( - closure(&c.dag, q1) - .iter() - .all(|&id| !is_summary(c.dag.payload(id))), + closure(&c.dag, q1).iter().all(|&id| { + let payload = c.dag.payload(id); + !is_summary(payload) || is_merge(payload) + }), "{}: Q1 reaches a summary", c.id ); @@ -270,6 +292,48 @@ fn stage1_logical_asap_optimization_keeps_independent_and_shared_variants() { } } +/// Pass 2's window-composition rule builds Q1's rate and Q2's option in six +/// 10-s tumbling panes (the gcd of the 1-min window and the 10-s interval), +/// each alone and both together, next to the whole-window candidates: 27 +/// candidates in all. +#[test] +fn stage1_logical_asap_optimization_window_composition_adds_10s_tumbling_panes() { + let run = pipeline(); + assert_eq!(run.logical.len(), 27); + let mut chains = BTreeSet::new(); + for c in &run.logical { + for id in c.dag.node_ids() { + if let Operator::ASAP(ASAPOp::PaneChain { + family, + pane_width_ms, + pane_count, + .. + }) = c.dag.payload(id) + { + let state = match family { + FieldDataType::ExactAggregate(kind, _) => format!("{kind:?}"), + FieldDataType::Sketch(kind, _) => format!("{:?}", kind.algorithm()), + other => panic!("{}: {other:?}", c.id), + }; + let query = readers(&c.dag, &c.query_roots, id); + chains.insert((state, query, *pane_width_ms, *pane_count)); + } + } + } + let expected: BTreeSet<_> = [ + ("Rate", 0), + ("Sum", 1), + ("CmsWithHeap", 1), + ("CountSketchWithHeap", 1), + ] + .into_iter() + .map(|(state, query)| (state.to_string(), BTreeSet::from([query]), 10_000, 6)) + .collect(); + assert_eq!(chains, expected); + let whole = run.logical.iter().filter(|c| whole_windows(&c.dag)).count(); + assert_eq!(whole, 9); +} + /// Only the raw input is ever shared between Q1 and Q2; no summary is shared. #[test] fn stage1_logical_asap_optimization_shares_input_but_never_a_summary() { @@ -295,7 +359,7 @@ fn stage1_logical_asap_optimization_candidates_are_valid_and_uniquely_named() { // ── Physical ASAP-aware optimization ───────────────────────────────────── /// No candidate is discarded before plan selection: the logical candidates -/// map one-to-one, 3 of them without a shared input. +/// map one-to-one, 3 of them without a shared input or tumbling panes. #[test] fn stage2_physical_asap_optimization_keeps_every_logical_candidate() { let run = pipeline(); @@ -303,7 +367,7 @@ fn stage2_physical_asap_optimization_keeps_every_logical_candidate() { let unshared = run .physical .iter() - .filter(|p| !classify(p.dag(), &p.query_roots).1) + .filter(|p| whole_windows(p.dag()) && !classify(p.dag(), &p.query_roots).1) .count(); assert_eq!(unshared, 3); } @@ -378,12 +442,13 @@ fn stage2_physical_asap_optimization_exact_topk_returns_job_and_topk_10() { assert_eq!(partition_by.len(), 1, "{}: partitioned by job", p.id); } -/// A summary Q2 is a build node feeding a top-10 estimation node, with no merge. +/// A summary Q2 over its whole window is a build node feeding a top-10 +/// estimation node, with no merge. #[test] fn stage2_physical_asap_optimization_summary_topk_is_build_then_estimate() { let run = pipeline(); for p in &run.physical { - if classify(p.dag(), &p.query_roots).0 == Q2Option::Exact { + if classify(p.dag(), &p.query_roots).0 == Q2Option::Exact || !whole_windows(p.dag()) { continue; } assert!( @@ -543,7 +608,9 @@ fn stage3_plan_selection_shared_input_ties_up_to_rounding() { let shared: Vec<_> = run .physical .iter() - .filter(|p| classify(p.dag(), &p.query_roots) == (Q2Option::Exact, true)) + .filter(|p| { + whole_windows(p.dag()) && classify(p.dag(), &p.query_roots) == (Q2Option::Exact, true) + }) .map(|p| (p.id.clone(), run.cost(&p.id).unwrap())) .collect(); assert!(!shared.is_empty()); @@ -564,6 +631,33 @@ fn stage3_plan_selection_shared_input_ties_up_to_rounding() { assert_eq!(run.selection.selected, independent.id); } +/// Tumbling panes rebuilt at every evaluation cost more than the whole +/// window: the panes read the same rows and update the same states, and +/// merging them adds work. Heap panes are invalid like their whole-window +/// builds (and their merged top-k is only approximate). +#[test] +fn stage3_plan_selection_tumbling_panes_at_query_time_cost_more() { + let run = pipeline(); + let selected = run.cost(&run.selection.selected).unwrap(); + let invalid = run.invalid(); + let mut compared = 0; + for p in run.physical.iter().filter(|p| !whole_windows(p.dag())) { + match run.cost(&p.id) { + Some(cost) => { + assert!(cost > selected * (1.0 + 1e-9), "{}: {cost}", p.id); + compared += 1; + } + None => assert_ne!( + classify(p.dag(), &p.query_roots).0, + Q2Option::Exact, + "{}: {invalid:?}", + p.id + ), + } + } + assert!(compared > 0); +} + /// The selected plan is the cheapest valid candidate for the whole workload. #[test] fn stage3_plan_selection_selects_cheapest_valid() { @@ -678,6 +772,7 @@ fn stage3_plan_selection_shared_input_is_not_costlier() { let by_combo: BTreeMap<_, _> = run .physical .iter() + .filter(|p| whole_windows(p.dag())) .filter_map(|p| Some((classify(p.dag(), &p.query_roots), run.cost(&p.id)?))) .collect(); let mut compared = 0; diff --git a/crates/integration-tests/tests/planner_layering_example3.rs b/crates/integration-tests/tests/planner_layering_example3.rs index cb0a5f023..670234f4c 100644 --- a/crates/integration-tests/tests/planner_layering_example3.rs +++ b/crates/integration-tests/tests/planner_layering_example3.rs @@ -271,7 +271,8 @@ fn stage3_plan_selection_a_charges_each_node_per_consuming_query() { /// Sharing the scan never costs more than scanning separately, for the same per-computation choices. #[test] -#[ignore = "needs plan selection row estimates for time-shifted scans and narrower time ranges (#632)"] +#[ignore = "needs plan selection to charge a shared scan that is not materialized per query by the \ + window each query reads, not by the longest window it serves (#632)"] fn stage3_plan_selection_a_shared_scan_is_not_costlier() { let run = run_a(); let key = |c: &Logical| { @@ -328,7 +329,8 @@ fn stage1_logical_asap_optimization_b_pass1_offers_exact_and_kll() { /// Each Pass 1 option gets three window forms: none, a 5-min sliding window with a 1-min slide, and 1-min tumbling windows. #[test] -#[ignore = "needs Pass 2 window composition: tumbling windows (#601) and sliding windows (no PR yet)"] +#[ignore = "needs Pass 2 window composition: sliding windows (no PR yet); tumbling windows pass in \ + stage1_logical_asap_optimization_b_window_composition_adds_tumbling_per_mergeable_option"] fn stage1_logical_asap_optimization_b_window_composition_adds_sliding_and_tumbling_per_option() { let run = run_b(); let summaries: BTreeSet<_> = options(&run, 0) @@ -358,9 +360,54 @@ fn stage1_logical_asap_optimization_b_window_composition_adds_sliding_and_tumbli } } +/// Each summary option of Pass 1 (KLL and DDSketch, both mergeable) also +/// comes as 1-min tumbling panes, gcd(5 min, 1 min), merged five at a time +/// before its p99 estimate; the whole-window builds are kept and read no +/// merge. Exact has no summary to split: 2 options × 2 forms + exact = 5. +#[test] +fn stage1_logical_asap_optimization_b_window_composition_adds_tumbling_per_mergeable_option() { + let run = run_b(); + assert_eq!(run.logical.len(), 5); + let mut found = BTreeSet::new(); + for c in &run.logical { + for (build, algorithm, form, _) in windowed_builds(c) { + let merged = estimates_of(&c.dag, build).iter().all(|(e, _)| { + c.dag + .producers(*e) + .into_iter() + .any(|p| is_merge(c.dag.payload(p))) + }); + assert_eq!(merged, form != WindowForm::None, "{}: {form:?}", c.id); + if let asap_types::ir::Operator::ASAP(asap_types::ir::ASAPOp::PaneChain { + pane_count, + .. + }) = c.dag.payload(build) + { + assert_eq!(*pane_count, 5, "{}", c.id); + } + found.insert((format!("{algorithm:?}"), form)); + } + } + let tumbling = WindowForm::Tumbling { + length_ms: PATTERN_B_INTERVAL_MS, + }; + let expected: BTreeSet<_> = ["DDSketch", "Kll"] + .into_iter() + .flat_map(|a| [(a.to_string(), WindowForm::None), (a.to_string(), tumbling)]) + .collect(); + assert_eq!(found, expected); +} + /// Window parameters are legal: L divides W, s divides L and the evaluation interval, a tumbling length divides both. #[test] fn stage1_logical_asap_optimization_b_window_parameters_are_legal() { + let tumbling = run_b() + .logical + .iter() + .flat_map(windowed_builds) + .filter(|(_, _, form, _)| matches!(form, WindowForm::Tumbling { .. })) + .count(); + assert!(tumbling > 0, "not vacuous"); let (w, every) = (PATTERN_B_WINDOW_MS, PATTERN_B_INTERVAL_MS); for c in &run_b().logical { for (_, _, form, _) in windowed_builds(c) { @@ -388,7 +435,8 @@ fn stage1_logical_asap_optimization_b_window_parameters_are_legal() { /// A sliding window with L = W reads one completed window (no merge); tumbling windows merge W / length of them. #[test] -#[ignore = "needs Pass 2 window composition: tumbling windows (#601) and sliding windows (no PR yet)"] +#[ignore = "needs Pass 2 window composition: sliding windows (no PR yet); tumbling merges pass in \ + stage1_logical_asap_optimization_b_window_composition_adds_tumbling_per_mergeable_option"] fn stage1_logical_asap_optimization_b_merge_only_where_the_window_form_needs_it() { let run = run_b(); let mut seen = BTreeSet::new(); @@ -446,3 +494,37 @@ fn stage3_plan_selection_b_selects_cheapest_valid() { assert_selects_cheapest_valid(&run); assert_each_node_charged_per_consuming_query(&run); } + +/// With nothing materialized, the 1-min KLL panes are all rebuilt at every +/// evaluation: they read the same 5 minutes of samples and update the same +/// states as one whole-window KLL, and merging five panes per series adds +/// 1M × 5 operations a minute. So whole-window KLL is selected at 2.100 per +/// second and the panes cost 2.183; exact costs 2.400. DDSketch, whole or in +/// panes, misses the rank target. +#[test] +fn stage3_plan_selection_b_panes_rebuilt_at_query_time_add_the_merge() { + let run = run_b(); + let cost = |c: &Logical| run.cost(&run.physical_of(c).next().unwrap().id); + let with = |algorithm: &str, panes: bool| { + run.logical + .iter() + .find(|c| { + query_option(&c.dag, &c.query_roots, 0) == algorithm + && windowed_builds(c) + .iter() + .any(|(_, _, f, _)| (*f != WindowForm::None) == panes) + }) + .unwrap_or_else(|| panic!("{algorithm} panes={panes}")) + }; + let whole = cost(with("Kll", false)).unwrap(); + let panes = cost(with("Kll", true)).unwrap(); + assert!((whole - 2.1).abs() < 1e-9, "{whole}"); + assert!((panes - (2.1 + 5e6 * 1e-6 / 60.0)).abs() < 1e-9, "{panes}"); + assert_eq!( + run.selection.selected, + run.physical_of(with("Kll", false)).next().unwrap().id + ); + for panes in [false, true] { + assert_eq!(cost(with("DDSketch", panes)), None, "panes={panes}"); + } +} diff --git a/crates/integration-tests/tests/tumbling_pane_merge.rs b/crates/integration-tests/tests/tumbling_pane_merge.rs index 9dac6ae81..d5e466af3 100644 --- a/crates/integration-tests/tests/tumbling_pane_merge.rs +++ b/crates/integration-tests/tests/tumbling_pane_merge.rs @@ -1,13 +1,14 @@ //! Tumbling panes merged by `SummaryMerge` answer the same per-series query -//! as one build over the whole window (#509 Example 3/4, Pattern B). -//! The panes are written by hand here; the planner's window-composition -//! rule emits them later. +//! as one build over the whole window (#509 Example 3/4, Pattern B): panes +//! written by hand, and the planner's window-composition rule's +//! `PaneChain`, expanded into the panes the executor runs. mod physical_common; use std::collections::BTreeMap; use std::rc::Rc; use std::sync::Arc; +use asap_aware_mapping::asap_aware_cse::{pane_sites, window_composition_variants}; use asap_integration_tests::fixtures::lower_promql; use asap_integration_tests::planning::selected_dag; use asap_physical_operators::physical_planner::{ @@ -16,10 +17,11 @@ use asap_physical_operators::physical_planner::{ use asap_physical_operators::runtime::Scope; use asap_physical_operators::values::{Batch, Value}; use asap_types::ir::operator_properties::TimeShift; +use asap_types::ir::pane_chain::expand_pane_chains; use asap_types::ir::physical_export::{compile_physical_asap_dag_with_node_ids, PhysicalASAPDAG}; use asap_types::ir::{ apply_materialization_timings, ASAPOp, Materialization, MaterializationAssignment, Medium, - NonASAPOp, Operator, OperatorNode, TimingMemo, + NonASAPOp, Operator, OperatorNode, QueryRoot, TimingMemo, }; use asap_types::post_asap::Schema; use asap_types::types::{ErrorMetric, RequestedAccuracy}; @@ -79,6 +81,33 @@ fn tumbling_panes(root: &Rc) -> (Rc, Vec) -> (Rc, Rc) { + let roots = [QueryRoot::Operator(Rc::clone(root))]; + let sites = pane_sites(&roots, &[Some(PANE_MS as u64)]); + let [site] = sites.as_slice() else { + panic!("one build to split: {sites:?}") + }; + assert_eq!((site.pane_width_ms, site.pane_count), (PANE_MS as u64, 5)); + let mut variants = window_composition_variants(&roots, &sites).unwrap(); + let variant = variants.pop().unwrap(); + assert!(variants.is_empty()); + let QueryRoot::Operator(planned) = variant.roots.unwrap().remove(0) else { + panic!("an operator root") + }; + planned.validate_structure().unwrap(); + assert_eq!( + planned.guarantee, root.guarantee, + "merged panes keep the whole build's guarantee" + ); + let expanded = expand_pane_chains(&planned).unwrap(); + expanded.validate_structure().unwrap(); + (planned, expanded) +} + /// `node` with `from` replaced by `to`. fn replace( node: &Rc, @@ -95,13 +124,21 @@ fn replace( ) } -/// Two series, four positive samples per minute in [0, 5m). +thread_local! { + /// How far after each 15-s step the samples fall (0: on the pane + /// boundaries). + static PHASE_MS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// Two series, four positive samples per minute in [0, 5m), each +/// [`PHASE_MS`] after its 15-s step. fn samples() -> Vec<(&'static str, i64, f64)> { + let phase = PHASE_MS.with(|p| p.get()); let mut rows = vec![]; for (s, series) in ["a", "b"].into_iter().enumerate() { for minute in 0..PANES { for j in 0..4 { - let ts = minute * PANE_MS + j * 15_000; + let ts = minute * PANE_MS + j * 15_000 + phase; rows.push((series, ts, (s * 100) as f64 + (minute * 4 + j + 1) as f64)); } } @@ -324,6 +361,14 @@ fn assert_pane_merge_matches_single_build(query: &str, accuracy: RequestedAccura expected, "retained panes" ); + let (planned, expanded) = planned_panes(&single); + assert_eq!( + render(&execute(&expanded)), + expected, + "the planner's pane chain, expanded" + ); + let unexpanded = compile_at_query_time(&planned).err().unwrap_or_default(); + assert!(unexpanded.contains("PaneChain"), "{unexpanded}"); result } @@ -355,6 +400,85 @@ fn quantile_over_tumbling_panes_matches_single_build() { } } +/// Exact counter Rate over 5 merged 1-minute panes equals one 5-minute +/// build: the merged increase is divided by the whole 5-minute window, not +/// by one pane's minute. +#[test] +fn exact_rate_over_tumbling_panes_matches_single_build() { + let rates = assert_pane_merge_matches_single_build("rate(m[5m])", RequestedAccuracy::exact()); + assert_eq!(rates.len(), 2); + // 19 counted over 285 s of samples, extrapolated to the 5-min window. + for rate in rates { + assert!((rate - 20.0 / 300.0).abs() < 1e-9, "{rate}"); + } +} + +/// With samples off the pane boundaries, Increase extrapolates to the +/// start of the whole 5-minute window, as one build does, not to the start +/// of the newest pane. +#[test] +fn exact_increase_off_the_pane_boundaries_matches_single_build() { + PHASE_MS.with(|p| p.set(7_000)); + let increases = + assert_pane_merge_matches_single_build("increase(m[5m])", RequestedAccuracy::exact()); + assert_eq!(increases.len(), 2); +} + +/// The single build of `query`, evaluated at `evaluation_ms` over every +/// sample, as values. +fn whole_build_values_at(query: &str, evaluation_ms: i64) -> Vec { + let root = single_build(query, RequestedAccuracy::exact()); + let exported = export(&root, &MaterializationAssignment::default()); + let inputs: BTreeMap = exported + .ranges + .iter() + .map(|&(id, _)| { + let schema = schema_of(&exported.dag, id); + let rows = samples() + .into_iter() + .map(|(series, ts, value)| { + let labels = BTreeMap::from([ + ("__name__".to_string(), "m".to_string()), + ("series".to_string(), series.to_string()), + ]); + promql_rows::series_row(&schema, &labels, ts, value).unwrap() + }) + .collect(); + (id, Batch::try_new(schema, rows).unwrap()) + }) + .collect(); + let plan = compile( + &exported.dag, + contracts(&inputs), + &[exported.dag.roots[0] as u64], + ) + .unwrap(); + values(&run( + &plan, + inputs, + Scope::Query { + evaluation_time_ms: evaluation_ms, + revision: 1, + }, + )) +} + +/// A counter over `[5m] offset 1m` evaluated a minute later reads the same +/// window as one without the offset: the counter window ends at the +/// evaluation time minus the offset, not at the evaluation time. +#[test] +fn offset_counter_window_ends_at_the_offset() { + PHASE_MS.with(|p| p.set(7_000)); + for function in ["rate", "increase"] { + let plain = whole_build_values_at(&format!("{function}(m[5m])"), EVALUATION_MS); + let shifted = whole_build_values_at( + &format!("{function}(m[5m] offset 1m)"), + EVALUATION_MS + PANE_MS, + ); + assert_eq!(shifted, plain, "{function}"); + } +} + /// Exact counter Increase over 5 merged 1-minute panes equals one 5-minute /// build: the merge joins consecutive panes across their boundaries. #[test] diff --git a/crates/types/src/ir/asap.rs b/crates/types/src/ir/asap.rs index e28d29d8f..67b5b2211 100644 --- a/crates/types/src/ir/asap.rs +++ b/crates/types/src/ir/asap.rs @@ -54,10 +54,36 @@ pub enum ASAPOp> { child: C, evaluation: PopulationStatistic, }, - /// Merge compatible partial states for the same grouping and family. + /// Merge compatible partial states for the same grouping and family: + /// every input state of a group, including each pane of a + /// [`PaneChain`](ASAPOp::PaneChain), into one state per group. SummaryMerge { children: Vec, }, + /// A tumbling-pane window summary (#509 Pass 2, window-composition + /// rule): the `SummaryAgg` with these `family`, `input`, `reduction`, + /// `grouping` and `filter`, built over each of `pane_count` back-to-back + /// range windows of `pane_width_ms` that end at `child`'s evaluation + /// time, newest first. `child` is the input a range selector would + /// read, so pane `i` covers `(-(i+1)·w, -i·w]` relative to it. Output: + /// the `SummaryAgg` schema, one state per group and pane; a + /// `SummaryMerge` over the chain gives the state of one build over the + /// whole `pane_count · pane_width_ms` window + /// ([`whole_window_build`](crate::ir::pane_chain::whole_window_build)). + /// One compact node whatever the pane count: costs and guarantees come + /// from formulas, and the executor expands the panes + /// ([`expand_pane_chains`](crate::ir::pane_chain::expand_pane_chains)). + PaneChain { + child: C, + family: FieldDataType, + input: SummaryUpdate, + reduction: Reduction, + grouping: GroupingStrategy, + #[serde(default)] + filter: Option>, + pane_width_ms: u64, + pane_count: u32, + }, // ── Reserved: migrated but unimplemented ── SummarySubtract { left: C, @@ -83,7 +109,7 @@ impl ASAPOp { pub fn children(&self) -> Vec<&C> { use ASAPOp::*; match self { - SummaryAgg { child, filter, .. } => { + SummaryAgg { child, filter, .. } | PaneChain { child, filter, .. } => { let mut inputs = vec![child]; if let Some(filter) = filter { inputs.extend(filter.0.operator_refs()); @@ -125,6 +151,27 @@ impl ASAPOp { .as_ref() .map(|p| super::scalar::Predicate(p.0.map_operator_refs(&mut f))), }, + PaneChain { + child, + family, + input, + reduction, + grouping, + filter, + pane_width_ms, + pane_count, + } => PaneChain { + child: f(child), + family: family.clone(), + input: input.clone(), + reduction: reduction.clone(), + grouping: grouping.clone(), + filter: filter + .as_ref() + .map(|p| super::scalar::Predicate(p.0.map_operator_refs(&mut f))), + pane_width_ms: *pane_width_ms, + pane_count: *pane_count, + }, SummaryEstimate { summary_input, query, @@ -179,6 +226,7 @@ impl ASAPOp { MaintainPopulation { .. } => "MaintainPopulation", EvaluatePopulation { .. } => "EvaluatePopulation", SummaryMerge { .. } => "SummaryMerge", + PaneChain { .. } => "PaneChain", SummarySubtract { .. } => "SummarySubtract", SummaryDelete { .. } => "SummaryDelete", SummaryJoin { .. } => "SummaryJoin", @@ -204,7 +252,9 @@ impl ASAPOp { /// The summary state this operator produces, if it produces state. pub fn produced_state(&self) -> Option<&FieldDataType> { match self { - ASAPOp::SummaryAgg { family, .. } | ASAPOp::SummaryJoin { family, .. } => Some(family), + ASAPOp::SummaryAgg { family, .. } + | ASAPOp::PaneChain { family, .. } + | ASAPOp::SummaryJoin { family, .. } => Some(family), ASAPOp::SummaryMerge { children } => children.first().and_then(|child| { child .schema @@ -229,6 +279,12 @@ impl ASAPOp { family, reduction, .. + } + | PaneChain { + child, + family, + reduction, + .. } => { let mut schema = crate::ir::aggregate_schema::aggregate_output_schema( &child.schema, @@ -261,11 +317,16 @@ impl ASAPOp { SketchStatistic::TopK { .. } => ("topk", DataType::Utf8), }; if matches!( - summary_input.asap(), - Some(SummaryAgg { - reduction: Reduction::PerEntity, - .. - }) + summary_input.summary_build(), + Some( + SummaryAgg { + reduction: Reduction::PerEntity, + .. + } | PaneChain { + reduction: Reduction::PerEntity, + .. + } + ) ) && dtype == DataType::Int64 { dtype = DataType::Float64; @@ -281,6 +342,13 @@ impl ASAPOp { schema } FinalizeExactAccumulator { child } => { + // Merged panes finalize as one build over their whole window. + if let Some(chain) = super::pane_chain::merged_chain(child) { + return FinalizeExactAccumulator { + child: Rc::new(super::pane_chain::whole_window_build(chain)?), + } + .output_schema(); + } let value_result = if let Some(ASAPOp::SummaryAgg { child: source, family: FieldDataType::ExactAggregate(kind, _), @@ -288,7 +356,7 @@ impl ASAPOp { reduction, filter, .. - }) = child.asap() + }) = child.summary_build() { { use crate::post_asap::{ExactKind, SummaryInputExpr}; @@ -439,6 +507,7 @@ impl ASAPOp { use ASAPOp::*; match self { SummaryAgg { .. } + | PaneChain { .. } | MaintainPopulation { .. } | SummaryMerge { .. } | SummarySubtract { .. } @@ -564,51 +633,28 @@ impl ASAPOp { } Ok(()) } - SummaryAgg { + PaneChain { child, - family, - input, - filter, + pane_width_ms, + pane_count, .. } => { - if family.is_plain() || child.result_kind == OperatorResultKind::State { + if *pane_width_ms == 0 || *pane_count == 0 { return Err(SchemaDerivationError::InvalidScalarSignature( - "summary aggregation requires values and produces a state family".into(), + "a pane chain needs a positive pane width and pane count".into(), )); } - fn check( - expr: &crate::post_asap::SummaryInputExpr, - schema: &Schema, - ) -> Result<(), SchemaDerivationError> { - use crate::post_asap::SummaryInputExpr; - match expr { - SummaryInputExpr::Column(col) => { - crate::pre_asap::resolve_column_ref(col, schema).map_err(|e| { - SchemaDerivationError::InvalidScalarSignature(e.to_string()) - })?; - } - SummaryInputExpr::Tuple(items) => { - for item in items { - check(item, schema)?; - } - } - _ => {} - } - Ok(()) - } - check(&input.weight, &child.schema)?; - if let Some(item) = &input.item { - check(item, &child.schema)?; + // The chain is the range selector: it reads the series the + // selector would. + if child.result_kind != OperatorResultKind::InstantVector { + return Err(SchemaDerivationError::InvalidScalarSignature(format!( + "a pane chain reads an instant vector, got {:?}", + child.result_kind + ))); } - if let Some(filter) = filter { - if filter.0.scalar_type(&child.schema)?.0 != DataType::Bool { - return Err(SchemaDerivationError::InvalidScalarSignature( - "summary filter must be boolean".into(), - )); - } - } - Ok(()) + self.summary_agg_inputs() } + SummaryAgg { .. } => self.summary_agg_inputs(), MaintainPopulation { child, population } => { if !population.matches_node(child) { return Err(SchemaDerivationError::InvalidScalarSignature( @@ -620,6 +666,64 @@ impl ASAPOp { _ => Err(Self::unimplemented()), } } + + /// The input checks of a `SummaryAgg`, which a `PaneChain` shares. + fn summary_agg_inputs(&self) -> Result<(), SchemaDerivationError> { + let (ASAPOp::SummaryAgg { + child, + family, + input, + filter, + .. + } + | ASAPOp::PaneChain { + child, + family, + input, + filter, + .. + }) = self + else { + unreachable!("called on a summary build"); + }; + if family.is_plain() || child.result_kind == OperatorResultKind::State { + return Err(SchemaDerivationError::InvalidScalarSignature( + "summary aggregation requires values and produces a state family".into(), + )); + } + fn check( + expr: &crate::post_asap::SummaryInputExpr, + schema: &Schema, + ) -> Result<(), SchemaDerivationError> { + use crate::post_asap::SummaryInputExpr; + match expr { + SummaryInputExpr::Column(col) => { + crate::pre_asap::resolve_column_ref(col, schema).map_err(|e| { + SchemaDerivationError::InvalidScalarSignature(e.to_string()) + })?; + } + SummaryInputExpr::Tuple(items) => { + for item in items { + check(item, schema)?; + } + } + _ => {} + } + Ok(()) + } + check(&input.weight, &child.schema)?; + if let Some(item) = &input.item { + check(item, &child.schema)?; + } + if let Some(filter) = filter { + if filter.0.scalar_type(&child.schema)?.0 != DataType::Bool { + return Err(SchemaDerivationError::InvalidScalarSignature( + "summary filter must be boolean".into(), + )); + } + } + Ok(()) + } } /// The plain value an exact accumulator finalizes to. @@ -657,13 +761,22 @@ fn quantile_may_be_empty(state: &OperatorNode) -> bool { Some(ASAPOp::SummaryMerge { children }) => { children.iter().any(|child| quantile_may_be_empty(child)) } - Some(ASAPOp::SummaryAgg { - child, - input, - reduction, - filter, - .. - }) => { + Some( + ASAPOp::SummaryAgg { + child, + input, + reduction, + filter, + .. + } + | ASAPOp::PaneChain { + child, + input, + reduction, + filter, + .. + }, + ) => { if filter.is_some() { return true; } diff --git a/crates/types/src/ir/mod.rs b/crates/types/src/ir/mod.rs index 85c97d20a..007880384 100644 --- a/crates/types/src/ir/mod.rs +++ b/crates/types/src/ir/mod.rs @@ -5,6 +5,7 @@ pub mod error; pub mod node; pub mod non_asap; pub mod operator_properties; +pub mod pane_chain; pub mod query; pub mod scalar; pub use asap::{ASAPOp, UNIMPLEMENTED_ASAP_OP}; diff --git a/crates/types/src/ir/node.rs b/crates/types/src/ir/node.rs index 1a9c7e005..c5c18b3a4 100644 --- a/crates/types/src/ir/node.rs +++ b/crates/types/src/ir/node.rs @@ -160,6 +160,18 @@ impl OperatorNode { SummaryCoverage::derive(self).ok() } + /// The build whose state this summary-state node carries: a + /// `SummaryAgg` or `PaneChain` itself, or the first input's build under + /// `SummaryMerge`s (merged inputs have one definition, which + /// [`coverage`](Self::coverage) checks). `None` for any other node. + pub fn summary_build(&self) -> Option<&ASAPOp> { + match self.asap()? { + op @ (ASAPOp::SummaryAgg { .. } | ASAPOp::PaneChain { .. }) => Some(op), + ASAPOp::SummaryMerge { children } => children.first()?.summary_build(), + _ => None, + } + } + /// A `SummaryMerge` is valid only over inputs with the same definition /// and disjoint selections. fn check_merge(&self) -> Result<(), SchemaDerivationError> { diff --git a/crates/types/src/ir/pane_chain.rs b/crates/types/src/ir/pane_chain.rs new file mode 100644 index 000000000..a112ca376 --- /dev/null +++ b/crates/types/src/ir/pane_chain.rs @@ -0,0 +1,223 @@ +//! Tumbling-pane window summaries: what an [`ASAPOp::PaneChain`] computes, +//! as the plain `SummaryAgg` nodes it stands for. +//! +//! A chain of `n` panes of width `w` over `child` is pane `i` (newest first, +//! `0 ≤ i < n`): the chain's `SummaryAgg` over a range `TimeRange(w)` over +//! `child` shifted back by `i·w`. A `SummaryMerge` over the chain is the +//! state of one build over `TimeRange(n·w)` ([`whole_window_build`]) when +//! the family merges (the family-capability table), and the executor runs +//! the chain as its panes ([`expand_pane_chains`]). +use std::collections::HashMap; +use std::rc::Rc; +use std::time::Duration; + +use super::asap::ASAPOp; +use super::node::{Operator, OperatorNode}; +use super::non_asap::{NonASAPOp, TimeRangeKind}; +use super::operator_properties::TimeShift; +use super::SchemaDerivationError; + +fn invalid(message: &str) -> SchemaDerivationError { + SchemaDerivationError::InvalidScalarSignature(message.into()) +} + +/// The `PaneChain` a summary-state node carries merged: the chain itself, +/// or the one chain a `SummaryMerge` reads. `None` for any other node. +pub fn merged_chain(state: &OperatorNode) -> Option<&OperatorNode> { + match state.asap()? { + ASAPOp::PaneChain { .. } => Some(state), + ASAPOp::SummaryMerge { children } => match children.as_slice() { + [child] if matches!(child.asap(), Some(ASAPOp::PaneChain { .. })) => Some(child), + _ => None, + }, + _ => None, + } +} + +/// The `SummaryAgg` over `TimeRange(pane_count · pane_width_ms)` over the +/// chain's input whose state the merged panes of `chain` equal. +pub fn whole_window_build(chain: &OperatorNode) -> Result { + let Some(ASAPOp::PaneChain { + child, + pane_width_ms, + pane_count, + .. + }) = chain.asap() + else { + return Err(invalid("expected a pane chain")); + }; + let window = pane_width_ms + .checked_mul(u64::from(*pane_count)) + .ok_or_else(|| invalid("pane chain window overflows"))?; + build_over(chain, range(Rc::clone(child), window)?) +} + +/// Pane `index` (0 = newest) of `chain`: its `SummaryAgg` over the range +/// `TimeRange(pane_width_ms)` ending `index · pane_width_ms` before the +/// chain's input. +pub fn pane(chain: &OperatorNode, index: u32) -> Result { + let Some(ASAPOp::PaneChain { + child, + pane_width_ms, + .. + }) = chain.asap() + else { + return Err(invalid("expected a pane chain")); + }; + let back = i64::try_from(pane_width_ms.saturating_mul(u64::from(index))) + .map_err(|_| invalid("pane offset overflows"))?; + build_over(chain, range(shifted(child, back)?, *pane_width_ms)?) +} + +/// `child` evaluated `back_ms` earlier: one `TimeShift`, folded into a +/// `TimeShift` directly below. +fn shifted( + child: &Rc, + back_ms: i64, +) -> Result, SchemaDerivationError> { + if back_ms == 0 { + return Ok(Rc::clone(child)); + } + let (shift, input) = match child.non_asap() { + Some(NonASAPOp::TimeShift { + shift, + child: input, + }) => ( + TimeShift { + offset_ms: shift + .offset_ms + .checked_add(back_ms) + .ok_or_else(|| invalid("pane offset overflows"))?, + at: shift.at, + }, + input, + ), + _ => ( + TimeShift { + offset_ms: back_ms, + at: None, + }, + child, + ), + }; + OperatorNode::new_shared(Operator::NonASAP(NonASAPOp::TimeShift { + shift, + child: Rc::clone(input), + })) +} + +fn range( + child: Rc, + width_ms: u64, +) -> Result, SchemaDerivationError> { + OperatorNode::new_shared(Operator::NonASAP(NonASAPOp::TimeRange { + range: Duration::from_millis(width_ms), + kind: TimeRangeKind::Range, + child, + })) +} + +/// The chain's `SummaryAgg` over `input`, with the chain's column names. +fn build_over( + chain: &OperatorNode, + input: Rc, +) -> Result { + let Some(ASAPOp::PaneChain { + family, + input: update, + reduction, + grouping, + filter, + .. + }) = chain.asap() + else { + return Err(invalid("expected a pane chain")); + }; + let mut build = OperatorNode::new(Operator::ASAP(ASAPOp::SummaryAgg { + child: input, + family: family.clone(), + input: update.clone(), + reduction: reduction.clone(), + grouping: grouping.clone(), + filter: filter.clone(), + }))?; + for (field, kept) in build.schema.fields.iter_mut().zip(&chain.schema.fields) { + field.name = kept.name.clone(); + field.table = kept.table.clone(); + } + Ok(build) +} + +/// `root` with every `PaneChain` expanded into its panes: a `SummaryMerge` +/// reads each pane of each chain it read, newest first, as plain +/// `SummaryAgg` nodes the executor runs. Every other node keeps its +/// guarantee, timing and materialization. The panes are new nodes without +/// timing or materialization: a chain's own materialization is dropped, so +/// expansion runs before timings are applied, and materializing panes +/// (keeping all but the newest between evaluations) is left to Stage 2 +/// (G8). A chain read by anything but a `SummaryMerge` is an error. +pub fn expand_pane_chains( + root: &Rc, +) -> Result, SchemaDerivationError> { + expand(root, &mut HashMap::new()) +} + +fn expand( + node: &Rc, + memo: &mut HashMap<*const OperatorNode, Rc>, +) -> Result, SchemaDerivationError> { + if let Some(done) = memo.get(&Rc::as_ptr(node)) { + return Ok(Rc::clone(done)); + } + let out = match &node.operator { + Operator::ASAP(ASAPOp::PaneChain { .. }) => { + return Err(invalid("a pane chain is read only through a summary merge")) + } + Operator::ASAP(ASAPOp::SummaryMerge { children }) => { + let mut inputs = Vec::new(); + for child in children { + match child.asap() { + Some(ASAPOp::PaneChain { pane_count, .. }) => { + for index in 0..*pane_count { + inputs.push(Rc::new(pane(child, index)?)); + } + } + _ => inputs.push(expand(child, memo)?), + } + } + let merge = + OperatorNode::new(Operator::ASAP(ASAPOp::SummaryMerge { children: inputs }))?; + Rc::new( + OperatorNode::with_schema(merge.operator, node.schema.clone()) + .with_guarantee(node.guarantee.clone()) + .with_timing(node.timing) + .with_materialization(node.materialization), + ) + } + _ => { + let mut changed = false; + let mut children = HashMap::new(); + for child in node.children() { + let new = expand(child, memo)?; + changed |= !Rc::ptr_eq(&new, child); + children.insert(Rc::as_ptr(child), new); + } + if changed { + Rc::new( + OperatorNode::with_schema( + node.operator + .map_children(|child| Rc::clone(&children[&Rc::as_ptr(child)])), + node.schema.clone(), + ) + .with_guarantee(node.guarantee.clone()) + .with_timing(node.timing) + .with_materialization(node.materialization), + ) + } else { + Rc::clone(node) + } + } + }; + memo.insert(Rc::as_ptr(node), Rc::clone(&out)); + Ok(out) +} diff --git a/crates/types/src/ir/summary_coverage.rs b/crates/types/src/ir/summary_coverage.rs index 6bb9c9080..72a5b41f2 100644 --- a/crates/types/src/ir/summary_coverage.rs +++ b/crates/types/src/ir/summary_coverage.rs @@ -66,7 +66,7 @@ pub enum Constraint { #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum CoverageError { - #[error("coverage is derived only for SummaryAgg and SummaryMerge")] + #[error("coverage is derived only for SummaryAgg, PaneChain and SummaryMerge")] NotSummary, #[error("summary merge requires at least one input")] EmptyMerge, @@ -81,7 +81,8 @@ pub enum CoverageError { } impl SummaryCoverage { - /// Coverage of a `SummaryAgg` or `SummaryMerge`. A merge fails unless + /// Coverage of a `SummaryAgg`, `PaneChain` or `SummaryMerge`. A chain + /// covers what one build over its whole window does. A merge fails unless /// every input has the same definition and their selections are /// pairwise disjoint; a family whose merge is idempotent /// ([`SelectionRelation::OverlapAllowed`] in the family-capability @@ -90,6 +91,12 @@ impl SummaryCoverage { pub fn derive(node: &OperatorNode) -> Result { match node.asap() { Some(ASAPOp::SummaryAgg { .. }) => Ok(of_summary_agg(node)), + // Back-to-back panes cover the whole window one build over it + // would. + Some(ASAPOp::PaneChain { .. }) => Ok(of_summary_agg( + &super::pane_chain::whole_window_build(node) + .map_err(|_| CoverageError::NotSummary)?, + )), Some(ASAPOp::SummaryMerge { children }) => { let inputs = children .iter() diff --git a/crates/types/src/ir/timing.rs b/crates/types/src/ir/timing.rs index d42725eac..c77de139c 100644 --- a/crates/types/src/ir/timing.rs +++ b/crates/types/src/ir/timing.rs @@ -42,7 +42,7 @@ //! //! | Consumer | Accepts from an input | //! |---|---| -//! | `SummaryAgg.child` | Rows, or exact-accumulator state, never a query-time value when the state is maintained | +//! | `SummaryAgg.child`, `PaneChain.child` | Rows, or exact-accumulator state, never a query-time value when the state is maintained | //! | `SummaryEstimate.summary_input` | Summary state at either phase | //! | `SummaryMerge.children` | Summary state at either phase; at ingestion time only for a merge at ingestion time | //! | `FinalizeExactAccumulator.child` | Exact-accumulator state | @@ -128,11 +128,15 @@ impl MaterializationAssignment { } /// Whether `operator`'s output is a sub-DAG output that materialization may -/// store: a `SummaryAgg` or a `MaintainPopulation`. +/// store: a `SummaryAgg`, a `PaneChain` or a `MaintainPopulation`. pub(crate) fn is_materialization_point(operator: &Operator) -> bool { matches!( operator, - Operator::ASAP(ASAPOp::SummaryAgg { .. } | ASAPOp::MaintainPopulation { .. }) + Operator::ASAP( + ASAPOp::SummaryAgg { .. } + | ASAPOp::PaneChain { .. } + | ASAPOp::MaintainPopulation { .. } + ) ) } @@ -458,7 +462,7 @@ fn validate_asap( timing: ExecutionTiming, ) -> Result<(), ExecutionDataStateError> { match op { - ASAPOp::SummaryAgg { child, .. } => { + ASAPOp::SummaryAgg { child, .. } | ASAPOp::PaneChain { child, .. } => { let avail = state_of(child); match avail { ExecutionDataState::INGESTION_ROWS | ExecutionDataState::QUERY_ROWS => {} diff --git a/crates/types/tests/pane_chain.rs b/crates/types/tests/pane_chain.rs new file mode 100644 index 000000000..211a14e9a --- /dev/null +++ b/crates/types/tests/pane_chain.rs @@ -0,0 +1,190 @@ +//! A `PaneChain` of tumbling panes stands for its panes: it covers what one +//! build over its whole window does, and expands into the `SummaryAgg` +//! panes the executor runs (#509 Pass 2, window-composition rule). +use std::ops::Bound; +use std::rc::Rc; +use std::time::Duration; + +use asap_types::ir::operator_properties::{Reduction, Source, TimeShift}; +use asap_types::ir::pane_chain::{expand_pane_chains, merged_chain, pane, whole_window_build}; +use asap_types::ir::{ASAPOp, NonASAPOp, Operator, OperatorNode, TimeRangeKind}; +use asap_types::post_asap::{ + GroupingStrategy, SketchAlgorithm, SketchKind, SketchParams, SketchStatistic, SummaryUpdate, +}; +use asap_types::pre_asap::{ColumnRef, DataType, Field, FieldDataType, Schema}; + +const MINUTE: u64 = 60_000; + +fn scan() -> Rc { + OperatorNode::new_shared(Operator::NonASAP(NonASAPOp::Scan { + source: Source::TimeSeries { metric: "m".into() }, + predicates: vec![], + schema: Schema::with_time_index( + vec![ + Field::plain("ts", DataType::Timestamp, false), + Field::plain("value", DataType::Float64, false), + ], + 0, + vec![], + ), + })) + .unwrap() +} + +fn shifted(child: Rc, offset_ms: i64) -> Rc { + OperatorNode::new_shared(Operator::NonASAP(NonASAPOp::TimeShift { + shift: TimeShift { + offset_ms, + at: None, + }, + child, + })) + .unwrap() +} + +fn kll() -> FieldDataType { + FieldDataType::Sketch( + SketchKind::new( + SketchAlgorithm::Kll, + SketchParams::Kll { + k: 200, + failure_probability: None, + }, + ), + GroupingStrategy::default(), + ) +} + +/// Five 1-min KLL panes per series over `input`. +fn chain(input: Rc) -> Rc { + OperatorNode::new_shared(Operator::ASAP(ASAPOp::PaneChain { + child: input, + family: kll(), + input: SummaryUpdate::column(ColumnRef::SampleValue), + reduction: Reduction::PerEntity, + grouping: GroupingStrategy::default(), + filter: None, + pane_width_ms: MINUTE, + pane_count: 5, + })) + .unwrap() +} + +fn merge(children: Vec>) -> Rc { + OperatorNode::new_shared(Operator::ASAP(ASAPOp::SummaryMerge { children })).unwrap() +} + +fn relative_time(node: &OperatorNode) -> (Bound, Bound) { + let coverage = node.coverage().expect("coverage"); + let [selection] = coverage.selection.as_slice() else { + panic!("one box: {coverage:?}") + }; + selection.relative_time.expect("a time window") +} + +/// The merged chain is a state of the build over the whole 5-min window: +/// the same schema and coverage `(-5m, 0]`, and it validates. +#[test] +fn merged_panes_cover_the_whole_window() { + let chain = chain(scan()); + let merged = merge(vec![Rc::clone(&chain)]); + merged.validate_structure().unwrap(); + assert!(merged_chain(&merged).is_some_and(|c| std::ptr::eq(c, &*chain))); + let whole = whole_window_build(&chain).unwrap(); + let Some(NonASAPOp::TimeRange { range, kind, .. }) = whole.children()[0].non_asap() else { + panic!("{:?}", whole.operator) + }; + assert_eq!( + (*range, *kind), + (Duration::from_millis(5 * MINUTE), TimeRangeKind::Range) + ); + assert_eq!(merged.schema, whole.schema); + assert_eq!(merged.coverage(), whole.coverage()); + assert_eq!( + relative_time(&merged), + (Bound::Excluded(-5 * MINUTE as i64), Bound::Included(0)) + ); +} + +/// Pane `i` is the build over `(-(i+1)·1m, -i·1m]`, the query's own offset +/// folded into one shift; the panes are disjoint and tile the window. +#[test] +fn each_pane_is_one_shifted_minute() { + let offset = 3_600_000; + let chain = chain(shifted(scan(), offset)); + for i in 0..5 { + let pane = pane(&chain, i).unwrap(); + let back = offset + i64::from(i) * MINUTE as i64; + assert_eq!( + relative_time(&pane), + ( + Bound::Excluded(-(back + MINUTE as i64)), + Bound::Included(-back) + ), + "pane {i}" + ); + let range = pane.children()[0]; + let Some(NonASAPOp::TimeShift { shift, child }) = range.children()[0].non_asap() else { + panic!("pane {i} reads a shift") + }; + assert_eq!(shift.offset_ms, back); + assert!(matches!(child.non_asap(), Some(NonASAPOp::Scan { .. }))); + } +} + +/// Expansion gives the executor a merge over the five panes, newest first, +/// which covers what the merged chain does; a chain read without a merge +/// does not expand. +#[test] +fn expansion_merges_the_panes() { + let chain = chain(scan()); + let merged = merge(vec![Rc::clone(&chain)]); + let estimate = OperatorNode::new_shared(Operator::ASAP(ASAPOp::SummaryEstimate { + summary_input: Rc::clone(&merged), + query: SketchStatistic::Quantile { q: 0.99 }, + })) + .unwrap(); + let expanded = expand_pane_chains(&estimate).unwrap(); + expanded.validate_structure().unwrap(); + assert_eq!(expanded.schema, estimate.schema); + let Some(ASAPOp::SummaryEstimate { summary_input, .. }) = expanded.asap() else { + panic!("{:?}", expanded.operator) + }; + let Some(ASAPOp::SummaryMerge { children }) = summary_input.asap() else { + panic!("{:?}", summary_input.operator) + }; + assert_eq!(children.len(), 5); + for (i, child) in children.iter().enumerate() { + assert_eq!(**child, pane(&chain, i as u32).unwrap(), "pane {i}"); + } + assert_eq!(summary_input.coverage(), merged.coverage()); + assert!(expand_pane_chains(&chain).is_err()); +} + +/// A chain needs a positive width and count, and reads the instant vector +/// a range selector would. +#[test] +fn a_chain_reads_an_instant_vector() { + let ranged = OperatorNode::new_shared(Operator::NonASAP(NonASAPOp::TimeRange { + range: Duration::from_millis(MINUTE), + kind: TimeRangeKind::Range, + child: scan(), + })) + .unwrap(); + assert!(chain(ranged).validate_structure().is_err()); + let Some(ASAPOp::PaneChain { .. }) = chain(scan()).asap() else { + unreachable!() + }; + let empty = OperatorNode::new_shared(Operator::ASAP(ASAPOp::PaneChain { + child: scan(), + family: kll(), + input: SummaryUpdate::column(ColumnRef::SampleValue), + reduction: Reduction::PerEntity, + grouping: GroupingStrategy::default(), + filter: None, + pane_width_ms: MINUTE, + pane_count: 0, + })) + .unwrap(); + assert!(empty.validate_structure().is_err()); +} diff --git a/docs/design_docs/proposals/planner-layering-example1-acceptance.md b/docs/design_docs/proposals/planner-layering-example1-acceptance.md index d54b47e47..00c6d14b0 100644 --- a/docs/design_docs/proposals/planner-layering-example1-acceptance.md +++ b/docs/design_docs/proposals/planner-layering-example1-acceptance.md @@ -16,8 +16,8 @@ whose expectation needs a feature that is not in the stack yet is | Stage | Doc (#509) | MVP (this spec) | |---|---|---| | Query-language frontends | 1 workload `LogicalDAG` | same | -| Logical ASAP-aware optimization | Pass 1 (3) × identical-expression rule (2) × window-composition rule (3 × 3) = **54** | Pass 1 only = **3**. Pass 2 is not implemented: the identical-expression rule is #588, window composition #601. | -| Physical ASAP-aware optimization | Materialization options per window form = **156** | Physical operator implementation, every sub-DAG `NotMaterialized` = **3** (the doc's Raw plans). Materialization enumeration is #604. | +| Logical ASAP-aware optimization | Pass 1 (3) × identical-expression rule (2) × window-composition rule (3 × 3) = **54** | Pass 1 (3), each with 2 identical-expression candidates and 6 window-composition candidates (Q1's rate and Q2's option in six 10-s tumbling panes, alone or both, each also with a shared scan) = **27**. Sliding windows are not implemented. | +| Physical ASAP-aware optimization | Materialization options per window form = **156** | Physical operator implementation, every sub-DAG `NotMaterialized` = **27** (the doc's Raw plans, with panes rebuilt at every refresh). Materialization enumeration is #604. | | Plan selection | 1 plan | 1 plan | Every MVP candidate is one of the doc's candidates: in logical ASAP-aware @@ -49,7 +49,7 @@ Invariants: * Q1 and Q2 share no node. Sharing is a logical ASAP-aware optimization decision. -## Logical ASAP-aware optimization: 3 candidates +## Logical ASAP-aware optimization: 3 Pass 1 candidates (27 in all) Pass 1 targets and their per-computation candidates: @@ -63,14 +63,15 @@ Pass 1 targets and their per-computation candidates: | Id | Q1 | Q2 top-*k* | |---|---|---| | L1 | exact | exact (sort + limit 10 per job) | -| L2 | exact | Count-Min + top-*k* heap, one per job | -| L3 | exact | CountSketch + top-*k* heap, one per job | +| L10 | exact | Count-Min + top-*k* heap, one per job | +| L19 | exact | CountSketch + top-*k* heap, one per job | Ids follow the enumeration order; tests identify candidates by structure. Invariants: -* Exactly 3 candidates, one per Q2 option. No duplicates. +* Exactly 3 candidates with whole windows and no shared input, one per Q2 + option. No duplicates. Each is followed by its 8 Pass 2 candidates. * Every candidate covers both queries. * Q1 never reaches a summary node. * Every target's exact option is its exact accumulator (`SummaryAgg` with an @@ -89,13 +90,15 @@ Ignored until their feature lands: * A shared-input variant of every Q2 option next to the independent one (Pass 2 identical-expression rule, #588). -## Physical ASAP-aware optimization: 3 candidates +## Physical ASAP-aware optimization: 27 candidates + +The three whole-window candidates without a shared input: | Id | From | Q2 physical operators | Materialization | |---|---|---|---| | P1 | L1 | sort (partition by job) → limit 10 | all `NotMaterialized` | -| P2 | L2 | CMS + heap build → top-10 estimate | all `NotMaterialized` | -| P3 | L3 | CountSketch + heap build → top-10 estimate | all `NotMaterialized` | +| P10 | L10 | CMS + heap build → top-10 estimate | all `NotMaterialized` | +| P19 | L19 | CountSketch + heap build → top-10 estimate | all `NotMaterialized` | Q1 is the same in all three: scan → range → rate accumulator → sum accumulator, each finalized. diff --git a/docs/design_docs/proposals/planner-layering-example3-acceptance.md b/docs/design_docs/proposals/planner-layering-example3-acceptance.md index a09a29ac2..11a78d372 100644 --- a/docs/design_docs/proposals/planner-layering-example3-acceptance.md +++ b/docs/design_docs/proposals/planner-layering-example3-acceptance.md @@ -42,9 +42,9 @@ Shared data workload, except Pattern A's `arrival` is `mixed`. |---|---|---| | Query-language frontends | A: five scan → range → quantile chains. B: one. | Same; q3–q5 also have a `time_shift`. | | Logical ASAP-aware optimization, Pass 1 | A: exact or KLL over its own interval per query, 2⁵ = 32. B: exact, KLL. | A: exact, KLL (k = 547), DDSketch per query, 3⁵ = **243**. B: exact, KLL (k = 269), DDSketch, **3**. | -| Logical ASAP-aware optimization, Pass 2 | A: window composition adds one EH of KLLs over [T − 5 y, T], one merge + p99 estimate per query, plus a candidate for every grouping of two or more queries onto shared window summaries ("hundreds"). B: each Pass 1 option × {none, sliding L = 5 min s = 1 min (5 active windows), 1-min tumbling (merge 5)} = 6. Independent kept. | Identical-expression rule only: each Pass 1 candidate also gets its shared-input candidates (A: 3 per Pass 1 candidate; B: none). No window summaries. | +| Logical ASAP-aware optimization, Pass 2 | A: window composition adds one EH of KLLs over [T − 5 y, T], one merge + p99 estimate per query, plus a candidate for every grouping of two or more queries onto shared window summaries ("hundreds"). B: each Pass 1 option × {none, sliding L = 5 min s = 1 min (5 active windows), 1-min tumbling (merge 5)} = 6. Independent kept. | Identical-expression rule: each Pass 1 candidate also gets its shared-input candidates (A: 3 per Pass 1 candidate; B: none). Window-composition rule, tumbling panes only: B's KLL and DDSketch each also come as 1-min tumbling panes (a `PaneChain` of 5, merged before the p99 estimate), **5** in all; A is run once, so it gets none. No sliding windows or EHs. | | Physical ASAP-aware optimization | See Example 4. | One physical candidate per logical candidate, every sub-DAG `NotMaterialized`. | -| Plan selection | Not stated for Example 3. | Every candidate is valid. A: KLL for all five queries (P485); DDSketch in place of KLL ties, and the tie goes to enumeration order. B: KLL (P2, 2.100 per second), tied with DDSketch and selected on enumeration order; exact costs more (2.400). | +| Plan selection | Not stated for Example 3. | Every candidate is valid. A: KLL for all five queries (P485); DDSketch in place of KLL ties, and the tie goes to enumeration order. B: KLL (P2, 2.100 per second); the 1-min KLL panes, rebuilt at every evaluation since nothing is materialized, cost 2.183 (the same rows and updates plus merging 5 panes per series); exact costs 2.400; DDSketch, whole or in panes, misses the rank target. | ## Invariants and tests @@ -71,18 +71,20 @@ Shared data workload, except Pattern A's `arrival` is `mixed`. |---|---|---| | The query lowers to scan → range 5m → quantile, no summary | `stage0_query_language_frontends_b_lowers_to_one_range_quantile` | passes | | Exact and KLL options | `stage1_logical_asap_optimization_b_pass1_offers_exact_and_kll` | passes | -| Each summary option appears with no window, a 5-min sliding window with a 1-min slide, and 1-min tumbling windows | `stage1_logical_asap_optimization_b_window_composition_adds_sliding_and_tumbling_per_option` | ignored: tumbling #601, sliding no PR yet | -| Window parameters are legal: L divides W; s divides L and the evaluation interval; a tumbling length divides W and the interval | `stage1_logical_asap_optimization_b_window_parameters_are_legal` | passes (vacuously today) | -| Sliding with L = W has no merge; tumbling merges before the estimate | `stage1_logical_asap_optimization_b_merge_only_where_the_window_form_needs_it` | ignored: tumbling #601, sliding no PR yet | -| A window form that merges uses a mergeable summary (KLL, DDSketch), in both patterns | `stage1_logical_asap_optimization_window_merges_use_mergeable_summaries` | passes (vacuously today) | +| Each summary option appears with no window, a 5-min sliding window with a 1-min slide, and 1-min tumbling windows | `stage1_logical_asap_optimization_b_window_composition_adds_sliding_and_tumbling_per_option` | ignored: sliding, no PR yet | +| Each summary option appears with no window and as 1-min tumbling panes, 5 merged before the estimate | `stage1_logical_asap_optimization_b_window_composition_adds_tumbling_per_mergeable_option` | passes | +| Window parameters are legal: L divides W; s divides L and the evaluation interval; a tumbling length divides W and the interval | `stage1_logical_asap_optimization_b_window_parameters_are_legal` | passes | +| Sliding with L = W has no merge; tumbling merges before the estimate | `stage1_logical_asap_optimization_b_merge_only_where_the_window_form_needs_it` | ignored: sliding, no PR yet | +| A window form that merges uses a mergeable summary (KLL, DDSketch), in both patterns | `stage1_logical_asap_optimization_window_merges_use_mergeable_summaries` | passes | | One selected, cheapest valid, each node charged once per consuming query | `stage3_plan_selection_b_selects_cheapest_valid` | passes | +| Panes rebuilt at query time cost the whole build plus the merge; whole-window KLL is selected | `stage3_plan_selection_b_panes_rebuilt_at_query_time_add_the_merge` | passes | -**Reading window summaries.** The IR has no window summary yet, so tests read -it through `planner_layering_common::window_form(dag, build)`, which returns -`WindowForm::None` today. The window-composition implementer makes it return -`Sliding { length_ms, slide_ms }`, `Tumbling { length_ms }` or -`ExponentialHistogram { horizon_ms }` from the new IR. Merges are read as -`SummaryMerge` nodes between the build and the `SummaryEstimate`. +**Reading window summaries.** Tests read a build's window summary through +`planner_layering_common::window_form(dag, build)`: a `PaneChain` is +`Tumbling { length_ms }` (its pane width), and any other build `None`. +`Sliding { length_ms, slide_ms }` and `ExponentialHistogram { horizon_ms }` +wait for their IR. Merges are read as `SummaryMerge` nodes between the build +and the `SummaryEstimate`. ## Ambiguities and conflicts with the planner @@ -107,11 +109,11 @@ it through `planner_layering_common::window_form(dag, build)`, which returns text has `offset 1y`. We read `as_of` as the window's end (the result of the offset at T), not as a second shift. The frontend lowers the offset from the text. -7. **Plan selection statistics.** Time-shifted scans are priced as one minute - of data instead of years, and a 1-y range over a shared 5-y scan passes - all of its rows (#632). Once Pass 2 shares the scan (#588), these - estimates decide whether sharing looks cheaper, so the invariant test - waits on both. +7. **Plan selection statistics.** A scan reads the window above it, through + any time shift, a time shift is free, and a 1-y range over a shared 5-y + scan keeps one year of rows. A shared scan that is not materialized is + still charged once per query at the longest window it serves, so sharing + it costs more than separate scans, and the invariant test waits on #632. 8. **Identical-expression sharing.** Not mentioned by the doc. Once implemented (#588), the planner can share the `latency_ms` scan and the 2-y time shift read by q4 and q5 (the shift sits below the range). diff --git a/docs/user_guide_docs/stage-viewer.md b/docs/user_guide_docs/stage-viewer.md index 3043c00b2..11ab86a25 100644 --- a/docs/user_guide_docs/stage-viewer.md +++ b/docs/user_guide_docs/stage-viewer.md @@ -68,10 +68,10 @@ plan wins. | Tab | Workload | What to look for | | --- | --- | --- | -| 1 · dashboard panels | Two PromQL panels over 1M counter series every 10 s: an exact per-job rate, and the approximate top-10 series per job | The exact query stays exact; the CMS+heap and CountSketch+heap top-k plans are rejected with their reasons, so the all-exact plan wins; the plans that share the two queries' scan and range selector tie with it, and the independent plan is kept on enumeration order | +| 1 · dashboard panels | Two PromQL panels over 1M counter series every 10 s: an exact per-job rate, and the approximate top-10 series per job | The exact query stays exact; the CMS+heap and CountSketch+heap top-k plans are rejected with their reasons, so the all-exact plan wins; the plans that share the two queries' scan and range selector tie with it, and the independent plan is kept on enumeration order. Pass 2 also builds Q1's rate and Q2's option in six 10-s tumbling panes, each alone or both (27 plans in all); rebuilt at every refresh, the panes cost more than the whole window | | 2 · SQL flow statistics | Distinct sources, entropy and L2 of per-source counts over the last minute of flows | All 82 plans compose and are priced; none is pruned. The SQL frontend recognizes Q2 as entropy and Q3 (its counts cast to DOUBLE) as L2, each with an exact or UnivMon option and an exact population count for the empty-input NULL. 16 plans come from Pass 1. Pass 2 adds the plans that share identical nodes and, by the summary-capability rule, the plans in which one UnivMon serves two of the queries or all three, sized with each parameter's largest value among them. 70 plans are invalid: HLL or UnivMon for Q1 (50) because its bound has "failure probability None" (both need the source's distinct bound, which this example does not declare), and UnivMon for Q2 (20) because entropy has no certified bound. 12 are valid: Q1 exact or KMV, Q2 exact, and Q3 exact or UnivMon, each alone or sharing identical nodes. Q3's UnivMon keeps its L2 guarantee through the exact population count joined beside it and the `CASE` that decides the empty-input NULL on that count. Theta is not offered: `asap_sketchlib` has no Theta sketch. P1 (all exact) is selected at 6.08 per second; KMV on Q1 costs the same to three decimals, UnivMon on Q3 costs 8.08, and the shared plans cost 7.44 or more, because a shared node that is not materialized is charged once per query that reads it | | 3a · historical p99 batch | Five p99 reports over 1–5 years, run once | All 972 plans are priced: 243 Pass 1 plans, each with 3 shared-input plans. Each query builds its own sketch at query time. P485 is selected: KLL for all five queries. DDSketch in place of KLL ties, and the tie goes to enumeration order. The all-exact plan costs about 16% more | -| 3b · live p99 panel | p99 over the last 5 min every minute, 1M series | P2, KLL, is selected at 2.100 per second, tied with DDSketch and chosen on enumeration order; exact over the window's raw samples costs 2.400. Memory a query holds only while it runs is not charged. Everything runs at query time and nothing is materialized. KLL panes kept from ingestion time and the 200 ms latency check come with the window-summary PRs | +| 3b · live p99 panel | p99 over the last 5 min every minute, 1M series | P2, KLL, is selected at 2.100 per second; exact over the window's raw samples costs 2.400. Pass 2 adds KLL and DDSketch in five 1-min tumbling panes (5 plans in all): rebuilt at every evaluation, the KLL panes cost 2.183, the whole build plus merging the panes. DDSketch misses the rank target. Memory a query holds only while it runs is not charged. Everything runs at query time and nothing is materialized. KLL panes kept from ingestion time and the 200 ms latency check come with the materialization PRs | | 4a · monthly p99 reports | Example 3a repeated monthly | The same plan, with its cost amortized over a month | | 4b · panes that pay off | p99 over the last hour every 10 min, 1k series sampled every second, raw data not kept by the deployment | Maintaining six 10-min KLL panes at ingestion time wins | diff --git a/tools/dag-viewer/examples/planner-layering-example1.json b/tools/dag-viewer/examples/planner-layering-example1.json index 02716e1ec..b60f07a76 100644 --- a/tools/dag-viewer/examples/planner-layering-example1.json +++ b/tools/dag-viewer/examples/planner-layering-example1.json @@ -3176,38 +3176,36 @@ "timing": null }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "materialization": "NotMaterialized", "operator": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } }, - "result_kind": "range_vector", + "result_kind": "state", "schema": { "closed": true, "fields": [ @@ -3221,9 +3219,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -3259,26 +3260,10 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } }, @@ -3738,42 +3723,23 @@ "SummaryAgg": { "child": 7, "family": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 7, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" + "ExactAggregate": [ + "Sum", + "Sum" ] }, "filter": null, "grouping": "PerSubpopulationInstance", "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, + "item": null, "weight": { "Column": "SampleValue" }, "weight_domain": { - "kind": "samples_of_metric", - "metric": "http_requests_total" + "kind": "unknown_or_signed" } }, - "reduction": { - "Reduce": [ - 2 - ] - } + "reduction": "PerEntity" } } }, @@ -3783,117 +3749,23 @@ "fields": [ { "dtype": { - "Plain": "utf8" + "Plain": "timestamp" }, - "name": "job", - "nullable": true, + "name": "ts", + "nullable": false, "table": null }, { "dtype": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 7, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" + "ExactAggregate": [ + "Sum", + "Sum" ] }, "name": "state", "nullable": false, "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 8 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "topk", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 9, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 0 - } - }, - { - "alias": "topk_10", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ { "dtype": { "Plain": "utf8" @@ -3906,42 +3778,27 @@ "dtype": { "Plain": "utf8" }, - "name": "topk_10", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] }, "timing": null - } - ], - "roots": [ - { - "Operator": 5 }, - { - "Operator": 10 - } - ] - }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap", - "id": "L4" - }, - { - "dag": { - "nodes": [ { "guarantee": { "provenance": [ { "kind": "exact", - "reason": "exact over exact inputs" + "reason": "exact accumulator over exact input" } ], "spec": { @@ -3957,58 +3814,9 @@ }, "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": "http_requests_total" - } - } + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 } } }, @@ -4081,17 +3889,154 @@ "materialization": "NotMaterialized", "operator": { "NonASAP": { - "TimeRange": { - "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 + "Aggregate": { + "child": 9, + "filters": [], + "having": null, + "measures": [ + { + "accuracy": { + "error": 0.01, + "failure_probability": 0.001, + "metric": "absolute_stream_l1", + "scope": "whole_result" + }, + "k": 10, + "kind": "top_k" + } + ], + "output_names": [], + "reduction": { + "Reduce": [ + 2 + ] } } } }, - "result_kind": "range_vector", + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes", + "id": "L4" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "http_requests_total" + } + } + } + } + }, + "result_kind": "instant_vector", "schema": { "closed": true, "fields": [ @@ -4143,8 +4088,8 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryAgg": { - "child": 1, + "PaneChain": { + "child": 0, "family": { "ExactAggregate": [ "Rate", @@ -4162,6 +4107,8 @@ "kind": "unknown_or_signed" } }, + "pane_count": 6, + "pane_width_ms": 10000, "reduction": "PerEntity" } } @@ -4216,6 +4163,68 @@ }, "timing": null }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { "provenance": [ @@ -4499,42 +4508,23 @@ "SummaryAgg": { "child": 6, "family": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 7, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" + "ExactAggregate": [ + "Sum", + "Sum" ] }, "filter": null, "grouping": "PerSubpopulationInstance", "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, + "item": null, "weight": { "Column": "SampleValue" }, "weight_domain": { - "kind": "samples_of_metric", - "metric": "http_requests_total" + "kind": "unknown_or_signed" } }, - "reduction": { - "Reduce": [ - 2 - ] - } + "reduction": "PerEntity" } } }, @@ -4542,6 +4532,25 @@ "schema": { "closed": true, "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "nullable": false, + "table": null + }, { "dtype": { "Plain": "utf8" @@ -4552,29 +4561,17 @@ }, { "dtype": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 7, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] + "Plain": "utf8" }, - "name": "state", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -4582,17 +4579,29 @@ "timing": null }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 7 + "FinalizeExactAccumulator": { + "child": 7 } } }, @@ -4600,6 +4609,22 @@ "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" @@ -4612,14 +4637,15 @@ "dtype": { "Plain": "utf8" }, - "name": "topk", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -4627,27 +4653,49 @@ "timing": null }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "materialization": "NotMaterialized", "operator": { "NonASAP": { - "Project": { + "Aggregate": { "child": 8, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 0 - } - }, + "filters": [], + "having": null, + "measures": [ { - "alias": "topk_10", - "expr": { - "Column": 1 - } + "accuracy": { + "error": 0.01, + "failure_probability": 0.001, + "metric": "absolute_stream_l1", + "scope": "whole_result" + }, + "k": 10, + "kind": "top_k" } ], - "qualifier": null + "output_names": [], + "reduction": { + "Reduce": [ + 2 + ] + } } } }, @@ -4691,7 +4739,7 @@ } ] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1", + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes · shared Scan #1", "id": "L5" }, { @@ -5173,50 +5221,156 @@ }, "timing": null }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": 1, + "PaneChain": { + "child": 6, "family": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 7, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" + "ExactAggregate": [ + "Sum", + "Sum" ] }, "filter": null, "grouping": "PerSubpopulationInstance", "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, + "item": null, "weight": { "Column": "SampleValue" }, "weight_domain": { - "kind": "samples_of_metric", - "metric": "http_requests_total" + "kind": "unknown_or_signed" } }, - "reduction": { - "Reduce": [ - 2 - ] - } + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } }, @@ -5224,6 +5378,25 @@ "schema": { "closed": true, "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "nullable": false, + "table": null + }, { "dtype": { "Plain": "utf8" @@ -5234,29 +5407,17 @@ }, { "dtype": { - "Sketch": [ - { - "algorithm": "CmsWithHeap", - "category": "TopK", - "params": { - "CmsWithHeap": { - "depth": 7, - "heap_size": 100, - "width": 272 - } - } - }, - "PerSubpopulationInstance" - ] + "Plain": "utf8" }, - "name": "state", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -5268,13 +5429,87 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } + "SummaryMerge": { + "children": [ + 7 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" }, - "summary_input": 6 + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 } } }, @@ -5282,6 +5517,22 @@ "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" @@ -5294,14 +5545,15 @@ "dtype": { "Plain": "utf8" }, - "name": "topk", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -5309,27 +5561,49 @@ "timing": null }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "materialization": "NotMaterialized", "operator": { "NonASAP": { - "Project": { - "child": 7, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 0 - } - }, + "Aggregate": { + "child": 9, + "filters": [], + "having": null, + "measures": [ { - "alias": "topk_10", - "expr": { - "Column": 1 - } + "accuracy": { + "error": 0.01, + "failure_probability": 0.001, + "metric": "absolute_stream_l1", + "scope": "whole_result" + }, + "k": 10, + "kind": "top_k" } ], - "qualifier": null + "output_names": [], + "reduction": { + "Reduce": [ + 2 + ] + } } } }, @@ -5369,11 +5643,11 @@ "Operator": 5 }, { - "Operator": 8 + "Operator": 10 } ] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1, TimeRange #2", + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Sum acc for Q2 in 6 × 10s panes", "id": "L6" }, { @@ -5856,82 +6130,36 @@ "timing": null }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "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 - ] + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" ] }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" } - } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } }, - "result_kind": "instant_vector", + "result_kind": "state", "schema": { "closed": true, "fields": [ @@ -5945,9 +6173,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Sum", + "Sum" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -5979,38 +6210,18 @@ "timing": null }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "materialization": "NotMaterialized", "operator": { - "NonASAP": { - "TimeRange": { - "child": 6, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] } } }, - "result_kind": "range_vector", + "result_kind": "state", "schema": { "closed": true, "fields": [ @@ -6024,9 +6235,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Sum", + "Sum" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -6058,114 +6272,52 @@ "timing": null }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryAgg": { - "child": 7, - "family": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 149, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "samples_of_metric", - "metric": "http_requests_total" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } + "FinalizeExactAccumulator": { + "child": 7 } } }, - "result_kind": "state", + "result_kind": "instant_vector", "schema": { "closed": true, "fields": [ { "dtype": { - "Plain": "utf8" + "Plain": "timestamp" }, - "name": "job", - "nullable": true, + "name": "ts", + "nullable": false, "table": null }, { "dtype": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 149, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] + "Plain": "float64" }, - "name": "state", + "name": "value", "nullable": false, "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "timing": null - }, - { - "guarantee": null, - "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 8 - } - } - }, - "result_kind": "instant_vector", - "schema": { - "closed": true, - "fields": [ + }, { "dtype": { "Plain": "utf8" @@ -6178,14 +6330,15 @@ "dtype": { "Plain": "utf8" }, - "name": "topk", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -6193,27 +6346,49 @@ "timing": null }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "materialization": "NotMaterialized", "operator": { "NonASAP": { - "Project": { - "child": 9, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 0 - } - }, + "Aggregate": { + "child": 8, + "filters": [], + "having": null, + "measures": [ { - "alias": "topk_10", - "expr": { - "Column": 1 - } + "accuracy": { + "error": 0.01, + "failure_probability": 0.001, + "metric": "absolute_stream_l1", + "scope": "whole_result" + }, + "k": 10, + "kind": "top_k" } ], - "qualifier": null + "output_names": [], + "reduction": { + "Reduce": [ + 2 + ] + } } } }, @@ -6253,11 +6428,11 @@ "Operator": 5 }, { - "Operator": 10 + "Operator": 9 } ] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap", + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Sum acc for Q2 in 6 × 10s panes · shared Scan #1", "id": "L7" }, { @@ -6387,38 +6562,36 @@ "timing": null }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "materialization": "NotMaterialized", "operator": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } }, - "result_kind": "range_vector", + "result_kind": "state", "schema": { "closed": true, "fields": [ @@ -6432,9 +6605,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -6470,26 +6646,10 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } }, @@ -6761,17 +6921,61 @@ "materialization": "NotMaterialized", "operator": { "NonASAP": { - "TimeRange": { - "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 + "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": "http_requests_total" + } } } } }, - "result_kind": "range_vector", + "result_kind": "instant_vector", "schema": { "closed": true, "fields": [ @@ -6823,45 +7027,28 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryAgg": { + "PaneChain": { "child": 6, "family": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 149, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" + "ExactAggregate": [ + "Sum", + "Sum" ] }, "filter": null, "grouping": "PerSubpopulationInstance", "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, + "item": null, "weight": { "Column": "SampleValue" }, "weight_domain": { - "kind": "samples_of_metric", - "metric": "http_requests_total" + "kind": "unknown_or_signed" } }, - "reduction": { - "Reduce": [ - 2 - ] - } + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } }, @@ -6869,6 +7056,25 @@ "schema": { "closed": true, "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "nullable": false, + "table": null + }, { "dtype": { "Plain": "utf8" @@ -6879,29 +7085,17 @@ }, { "dtype": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 149, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] + "Plain": "utf8" }, - "name": "state", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -6913,13 +7107,87 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } + "SummaryMerge": { + "children": [ + 7 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" }, - "summary_input": 7 + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 } } }, @@ -6927,6 +7195,22 @@ "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" @@ -6939,14 +7223,15 @@ "dtype": { "Plain": "utf8" }, - "name": "topk", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] @@ -6954,27 +7239,49 @@ "timing": null }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "materialization": "NotMaterialized", "operator": { "NonASAP": { - "Project": { - "child": 8, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 0 - } - }, + "Aggregate": { + "child": 9, + "filters": [], + "having": null, + "measures": [ { - "alias": "topk_10", - "expr": { - "Column": 1 - } + "accuracy": { + "error": 0.01, + "failure_probability": 0.001, + "metric": "absolute_stream_l1", + "scope": "whole_result" + }, + "k": 10, + "kind": "top_k" } ], - "qualifier": null + "output_names": [], + "reduction": { + "Reduce": [ + 2 + ] + } } } }, @@ -7014,11 +7321,11 @@ "Operator": 5 }, { - "Operator": 9 + "Operator": 10 } ] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1", + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes, Sum acc for Q2 in 6 × 10s panes", "id": "L8" }, { @@ -7148,38 +7455,36 @@ "timing": null }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "materialization": "NotMaterialized", "operator": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } }, - "result_kind": "range_vector", + "result_kind": "state", "schema": { "closed": true, "fields": [ @@ -7193,9 +7498,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -7231,26 +7539,10 @@ "materialization": "NotMaterialized", "operator": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } }, @@ -7504,19 +7796,40407 @@ "guarantee": null, "materialization": "NotMaterialized", "operator": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 7 + } + } + }, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Aggregate": { + "child": 8, + "filters": [], + "having": null, + "measures": [ + { + "accuracy": { + "error": 0.01, + "failure_probability": 0.001, + "metric": "absolute_stream_l1", + "scope": "whole_result" + }, + "k": 10, + "kind": "top_k" + } + ], + "output_names": [], + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes, Sum acc for Q2 in 6 × 10s panes · shared Scan #1", + "id": "L9" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 7, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap", + "id": "L10" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1", + "id": "L11" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 6 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 7, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 8 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1, TimeRange #2", + "id": "L12" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 7, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes", + "id": "L13" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes · shared Scan #1", + "id": "L14" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · CMS+heap for Q2 in 6 × 10s panes", + "id": "L15" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · CMS+heap for Q2 in 6 × 10s panes · shared Scan #1", + "id": "L16" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes, CMS+heap for Q2 in 6 × 10s panes", + "id": "L17" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes, CMS+heap for Q2 in 6 × 10s panes · shared Scan #1", + "id": "L18" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 7, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap", + "id": "L19" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 6, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1", + "id": "L20" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 6 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 7, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 8 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1, TimeRange #2", + "id": "L21" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 7, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes", + "id": "L22" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 6, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes · shared Scan #1", + "id": "L23" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · CountSketch+heap for Q2 in 6 × 10s panes", + "id": "L24" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + }, + "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": "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": 1, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · CountSketch+heap for Q2 in 6 × 10s panes · shared Scan #1", + "id": "L25" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 10 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes, CountSketch+heap for Q2 in 6 × 10s panes", + "id": "L26" + }, + { + "dag": { + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": "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": "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": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "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": "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": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + }, + "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": "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + }, + "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": 3, + "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": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 + } + } + }, + "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 + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + }, + "result_kind": "state", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + }, + { + "guarantee": null, + "materialization": "NotMaterialized", + "operator": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + }, + "result_kind": "instant_vector", + "schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "timing": null + } + ], + "roots": [ + { + "Operator": 5 + }, + { + "Operator": 9 + } + ] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes, CountSketch+heap for Q2 in 6 × 10s panes · shared Scan #1", + "id": "L27" + } + ], + "capped": false, + "combinations": 27 + }, + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 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": 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": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 12, + "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": 11, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 7, + "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": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 7, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Sort": { + "child": 9, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "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": { + "Limit": { + "child": 10, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 12, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 11, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 12 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum 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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 7, + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 6, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 7 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "Sort": { + "child": 8, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Limit": { + "child": 9, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 10, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 11 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · shared Scan #1", + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 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": 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": 7, + "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" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "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": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 7, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 6 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "Sort": { + "child": 7, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "Limit": { + "child": 8, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 10 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · shared Scan #1, TimeRange #2", + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 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": 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": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 12, + "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": 11, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 7, + "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": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 7, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Sort": { + "child": 9, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "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": { + "Limit": { + "child": 10, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 12, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 11, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 12 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes", + "from_logical": "L4", + "id": "P4" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 7, + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 6, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 7 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "Sort": { + "child": 8, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Limit": { + "child": 9, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 10, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 11 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes · shared Scan #1", + "from_logical": "L5", + "id": "P5" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 12, + "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": 11, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 6, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Sort": { + "child": 9, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "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": { + "Limit": { + "child": 10, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 12, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 11, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 12 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Sum acc for Q2 in 6 × 10s panes", + "from_logical": "L6", + "id": "P6" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 7, + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 7 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "Sort": { + "child": 8, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Limit": { + "child": 9, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 10, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 11 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Sum acc for Q2 in 6 × 10s panes · shared Scan #1", + "from_logical": "L7", + "id": "P7" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 12, + "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": 11, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 6, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 8 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Sort": { + "child": 9, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "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": { + "Limit": { + "child": 10, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 12, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 11, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 12 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes, Sum acc for Q2 in 6 × 10s panes", + "from_logical": "L8", + "id": "P8" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "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": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": 7, + "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": "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": 10, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "timestamp" + }, + "name": "ts", + "nullable": false, + "table": null + }, + { + "dtype": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "name": "state", + "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 7 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "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": { + "Sort": { + "child": 8, + "keys": [ + { + "ascending": false, + "expr": { + "Column": 1 + }, + "nulls_first": false + } + ], + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 10, + "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": { + "Limit": { + "child": 9, + "n": 10, + "offset": 0, + "partition_by": [ + 2 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 11, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "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": 10, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 2 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 11 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · Rate acc for Q1 in 6 × 10s panes, Sum acc for Q2 in 6 × 10s panes · shared Scan #1", + "from_logical": "L9", + "id": "P9" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 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": 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": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 9, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 7, + "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": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "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": 7, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + } + }, + { + "guarantee": null, + "id": 10, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 10 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap", + "from_logical": "L10", + "id": "P10" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 8, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "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": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 9 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1", + "from_logical": "L11", + "id": "P11" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "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": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "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": 1, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 6 + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 7, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 8 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1, TimeRange #2", + "from_logical": "L12", + "id": "P12" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 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": 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": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 9, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 7, + "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": 6, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "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": 7, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + } + }, + { + "guarantee": null, + "id": 10, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 10 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes", + "from_logical": "L13", + "id": "P13" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 8, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "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": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 9 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes · shared Scan #1", + "from_logical": "L14", + "id": "P14" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 9, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + } + }, + { + "guarantee": null, + "id": 10, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 10 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · CMS+heap for Q2 in 6 × 10s panes", + "from_logical": "L15", + "id": "P15" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 8, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 1, + "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": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryAgg": { + "child": 1, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 9 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · CMS+heap for Q2 in 6 × 10s panes · shared Scan #1", + "from_logical": "L16", + "id": "P16" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "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": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 9, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 6, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 8 + } + } + } + }, + { + "guarantee": null, + "id": 10, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk_10", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 9, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 10 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes, CMS+heap for Q2 in 6 × 10s panes", + "from_logical": "L17", + "id": "P17" + }, + { + "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": 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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 1, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 3, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 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": "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": 3, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 5, + "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": 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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, + "producer": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 7, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 6, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "topk", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 8, + "role": "Input", + "window": "NotApplicable" + } + ], + "nodes": [ + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 0, + "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 1, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" + } + } + } + }, + { + "guarantee": null, + "id": 2, + "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": "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": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 1 + ] + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 3, + "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": { + "ASAP": { + "FinalizeExactAccumulator": { + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 1, + "child": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CmsWithHeap", + "category": "TopK", + "params": { + "CmsWithHeap": { + "depth": 7, + "heap_size": 100, + "width": 272 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, "family": { "Sketch": [ { - "algorithm": "CountSketchWithHeap", + "algorithm": "CmsWithHeap", "category": "TopK", "params": { - "CountSketchWithHeap": { - "depth": 149, + "CmsWithHeap": { + "depth": 7, "heap_size": 100, - "width": 30000 + "width": 272 } } }, @@ -7539,6 +48219,8 @@ "metric": "http_requests_total" } }, + "pane_count": 6, + "pane_width_ms": 10000, "reduction": { "Reduce": [ 2 @@ -7546,9 +48228,13 @@ } } } - }, - "result_kind": "state", - "schema": { + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { "closed": true, "fields": [ { @@ -7563,13 +48249,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CountSketchWithHeap", + "algorithm": "CmsWithHeap", "category": "TopK", "params": { - "CountSketchWithHeap": { - "depth": 149, + "CmsWithHeap": { + "depth": 7, "heap_size": 100, - "width": 30000 + "width": 272 } } }, @@ -7588,25 +48274,25 @@ ] ] }, - "timing": null + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + } }, { "guarantee": null, + "id": 8, "materialization": "NotMaterialized", - "operator": { - "ASAP": { - "SummaryEstimate": { - "query": { - "TopK": { - "k": 10 - } - }, - "summary_input": 6 - } - } - }, - "result_kind": "instant_vector", - "schema": { + "output_schema": { "closed": true, "fields": [ { @@ -7633,35 +48319,28 @@ ] ] }, - "timing": null + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } + }, + "summary_input": 7 + } + } + } }, { "guarantee": null, + "id": 9, "materialization": "NotMaterialized", - "operator": { - "NonASAP": { - "Project": { - "child": 7, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 0 - } - }, - { - "alias": "topk_10", - "expr": { - "Column": 1 - } - } - ], - "qualifier": null - } - } - }, - "result_kind": "instant_vector", - "schema": { + "output_schema": { "closed": true, "fields": [ { @@ -7688,27 +48367,44 @@ ] ] }, - "timing": null + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } } ], "roots": [ - { - "Operator": 5 - }, - { - "Operator": 8 - } - ] + 5, + 9 + ], + "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1, TimeRange #2", - "id": "L9" - } - ], - "capped": false, - "combinations": 9 - }, - "stage2_physical_asap_optimization": { - "candidates": [ + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · Rate acc for Q1 in 6 × 10s panes, CMS+heap for Q2 in 6 × 10s panes · shared Scan #1", + "from_logical": "L18", + "id": "P18" + }, { "dag": { "edges": [ @@ -8096,25 +48792,6 @@ "intermediate_schema": { "closed": true, "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, { "dtype": { "Plain": "utf8" @@ -8125,161 +48802,47 @@ }, { "dtype": { - "Plain": "utf8" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "$promql_series_identity", + "name": "state", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "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": "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": 10, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 12, - "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 - }, + "window": "NotApplicable" + }, + { + "consumer": 10, + "data_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ { "dtype": { "Plain": "utf8" @@ -8292,20 +48855,19 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 11, + "producer": 9, "role": "Input", "window": "NotApplicable" } @@ -9020,25 +49582,6 @@ "output_schema": { "closed": true, "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, { "dtype": { "Plain": "utf8" @@ -9049,17 +49592,29 @@ }, { "dtype": { - "Plain": "utf8" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "$promql_series_identity", + "name": "state", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -9073,67 +49628,53 @@ "SummaryAgg": { "child": 7, "family": { - "ExactAggregate": [ - "Sum", - "Sum" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" ] }, "filter": null, "grouping": "PerSubpopulationInstance", "input": { - "item": null, + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, "weight": { "Column": "SampleValue" }, "weight_domain": { - "kind": "unknown_or_signed" + "kind": "samples_of_metric", + "metric": "http_requests_total" } }, - "reduction": "PerEntity" + "reduction": { + "Reduce": [ + 2 + ] + } } } } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "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" @@ -9146,15 +49687,14 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -9165,141 +49705,24 @@ }, "payload": { "ASAP": { - "FinalizeExactAccumulator": { - "child": 8 - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 10, - "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": { - "Sort": { - "child": 9, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 } - ], - "partition_by": [ - 2 - ] + }, + "summary_input": 8 } } } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 11, + "guarantee": null, + "id": 10, "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" @@ -9312,15 +49735,14 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk_10", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -9329,76 +49751,15 @@ "primitive": "Raw", "timing": "query_time" }, - "payload": { - "NonASAP": { - "Limit": { - "child": 10, - "n": 10, - "offset": 0, - "partition_by": [ - 2 - ] - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 12, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "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": 11, + "child": 9, "cols": [ { "alias": "job", "expr": { - "Column": 2 + "Column": 0 } }, { @@ -9415,188 +49776,20 @@ } ], "roots": [ - 5, - 12 - ], - "scalar_roots": [] - }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum 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": 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": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "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": 1, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 3, - "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": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Plain": "utf8" - }, - "name": "$promql_series_identity", - "nullable": false, - "table": null - } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, + 5, + 10 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap", + "from_logical": "L19", + "id": "P19" + }, + { + "dag": { + "edges": [ { - "consumer": 4, + "consumer": 1, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -9646,20 +49839,36 @@ ] ] }, - "producer": 3, + "producer": 0, "role": "Input", "window": "NotApplicable" }, { - "consumer": 5, + "consumer": 2, "data_state": { - "primitive": "SummaryState", + "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" @@ -9670,31 +49879,29 @@ }, { "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] + "Plain": "utf8" }, - "name": "state", + "name": "$promql_series_identity", "nullable": false, "table": null } ], - "time_index": null, + "time_index": 0, "unique_keys": [ [ + 3, 0 ] ] }, - "producer": 4, + "producer": 1, "role": "Input", "window": "NotApplicable" }, { - "consumer": 6, + "consumer": 3, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "grouping": "NotApplicable", @@ -9711,9 +49918,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -9742,12 +49952,12 @@ ] ] }, - "producer": 0, + "producer": 2, "role": "Input", "window": "NotApplicable" }, { - "consumer": 7, + "consumer": 4, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -9797,12 +50007,12 @@ ] ] }, - "producer": 6, + "producer": 3, "role": "Input", "window": "NotApplicable" }, { - "consumer": 8, + "consumer": 5, "data_state": { "primitive": "SummaryState", "timing": "query_time" @@ -9813,10 +50023,10 @@ "fields": [ { "dtype": { - "Plain": "timestamp" + "Plain": "utf8" }, - "name": "ts", - "nullable": false, + "name": "job", + "nullable": true, "table": null }, { @@ -9829,38 +50039,21 @@ "name": "state", "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, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 7, + "producer": 4, "role": "Input", "window": "NotApplicable" }, { - "consumer": 9, + "consumer": 6, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -9910,12 +50103,12 @@ ] ] }, - "producer": 8, + "producer": 0, "role": "Input", "window": "NotApplicable" }, { - "consumer": 10, + "consumer": 7, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -9965,14 +50158,14 @@ ] ] }, - "producer": 9, + "producer": 6, "role": "Input", "window": "NotApplicable" }, { - "consumer": 11, + "consumer": 8, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "grouping": "NotApplicable", @@ -9981,20 +50174,55 @@ "fields": [ { "dtype": { - "Plain": "timestamp" + "Plain": "utf8" }, - "name": "ts", - "nullable": false, + "name": "job", + "nullable": true, "table": null }, { "dtype": { - "Plain": "float64" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null - }, + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, + "data_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ { "dtype": { "Plain": "utf8" @@ -10007,20 +50235,19 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 10, + "producer": 8, "role": "Input", "window": "NotApplicable" } @@ -10141,381 +50368,13 @@ 3, 0 ] - ] - }, - "source": { - "TimeSeries": { - "metric": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 1, - "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": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } - } - } - } - }, - { - "guarantee": null, - "id": 2, - "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": "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": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 3, - "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": { - "ASAP": { - "FinalizeExactAccumulator": { - "child": 2 - } - } - } - }, - { - "guarantee": null, - "id": 4, - "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": 3, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 5, - "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": 4 + "source": { + "TimeSeries": { + "metric": "http_requests_total" + } + } } } } @@ -10539,7 +50398,7 @@ "scope": "per_value" } }, - "id": 6, + "id": 1, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -10604,7 +50463,7 @@ }, { "guarantee": null, - "id": 7, + "id": 2, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -10620,8 +50479,8 @@ { "dtype": { "ExactAggregate": [ - "Sum", - "Sum" + "Rate", + "Rate" ] }, "name": "state", @@ -10660,11 +50519,11 @@ "payload": { "ASAP": { "SummaryAgg": { - "child": 6, + "child": 1, "family": { "ExactAggregate": [ - "Sum", - "Sum" + "Rate", + "Rate" ] }, "filter": null, @@ -10702,7 +50561,7 @@ "scope": "per_value" } }, - "id": 8, + "id": 3, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -10755,7 +50614,75 @@ "payload": { "ASAP": { "FinalizeExactAccumulator": { - "child": 7 + "child": 2 + } + } + } + }, + { + "guarantee": null, + "id": 4, + "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": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } } } } @@ -10779,27 +50706,11 @@ "scope": "per_value" } }, - "id": 9, + "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" @@ -10810,17 +50721,16 @@ }, { "dtype": { - "Plain": "utf8" + "Plain": "float64" }, - "name": "$promql_series_identity", + "name": "sum", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -10830,21 +50740,9 @@ "timing": "query_time" }, "payload": { - "NonASAP": { - "Sort": { - "child": 8, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false - } - ], - "partition_by": [ - 2 - ] + "ASAP": { + "FinalizeExactAccumulator": { + "child": 4 } } } @@ -10868,7 +50766,7 @@ "scope": "per_value" } }, - "id": 10, + "id": 6, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -10920,37 +50818,20 @@ }, "payload": { "NonASAP": { - "Limit": { - "child": 9, - "n": 10, - "offset": 0, - "partition_by": [ - 2 - ] + "TimeRange": { + "child": 0, + "kind": "range", + "range": { + "nanos": 0, + "secs": 60 + } } } } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 11, + "guarantee": null, + "id": 7, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -10965,83 +50846,89 @@ }, { "dtype": { - "Plain": "float64" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "topk_10", + "name": "state", "nullable": false, "table": null } ], "time_index": null, - "unique_keys": [] + "unique_keys": [ + [ + 0 + ] + ] }, "output_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "payload": { - "NonASAP": { - "Project": { - "child": 10, - "cols": [ - { - "alias": "job", - "expr": { - "Column": 2 + "ASAP": { + "SummaryAgg": { + "child": 6, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" } }, - { - "alias": "topk_10", - "expr": { - "Column": 1 - } + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" } - ], - "qualifier": null + }, + "reduction": { + "Reduce": [ + 2 + ] + } } } } - } - ], - "roots": [ - 5, - 11 - ], - "scalar_roots": [] - }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · shared Scan #1", - "from_logical": "L2", - "id": "P2" - }, - { - "dag": { - "edges": [ + }, { - "consumer": 1, - "data_state": { - "primitive": "Raw", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { + "guarantee": null, + "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" @@ -11054,107 +50941,42 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "data_state": { + "output_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" + "payload": { + "ASAP": { + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 + } }, - "name": "$promql_series_identity", - "nullable": false, - "table": null + "summary_input": 7 } - ], - "time_index": 0, - "unique_keys": [ - [ - 3, - 0 - ] - ] - }, - "producer": 1, - "role": "Input", - "window": "NotApplicable" + } + } }, { - "consumer": 3, - "data_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "grouping": "NotApplicable", - "intermediate_schema": { + "guarantee": null, + "id": 9, + "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" @@ -11167,25 +50989,61 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk_10", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 2, - "role": "Input", - "window": "NotApplicable" - }, + "output_state": { + "primitive": "Raw", + "timing": "query_time" + }, + "payload": { + "NonASAP": { + "Project": { + "child": 8, + "cols": [ + { + "alias": "job", + "expr": { + "Column": 0 + } + }, + { + "alias": "topk_10", + "expr": { + "Column": 1 + } + } + ], + "qualifier": null + } + } + } + } + ], + "roots": [ + 5, + 9 + ], + "scalar_roots": [] + }, + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1", + "from_logical": "L20", + "id": "P20" + }, + { + "dag": { + "edges": [ { - "consumer": 4, + "consumer": 1, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -11235,53 +51093,12 @@ ] ] }, - "producer": 3, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 5, - "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": 4, + "producer": 0, "role": "Input", "window": "NotApplicable" }, { - "consumer": 6, + "consumer": 2, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -11336,7 +51153,7 @@ "window": "NotApplicable" }, { - "consumer": 7, + "consumer": 3, "data_state": { "primitive": "SummaryState", "timing": "query_time" @@ -11356,8 +51173,8 @@ { "dtype": { "ExactAggregate": [ - "Sum", - "Sum" + "Rate", + "Rate" ] }, "name": "state", @@ -11389,12 +51206,12 @@ ] ] }, - "producer": 6, + "producer": 2, "role": "Input", "window": "NotApplicable" }, { - "consumer": 8, + "consumer": 4, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -11444,12 +51261,53 @@ ] ] }, - "producer": 7, + "producer": 3, "role": "Input", "window": "NotApplicable" }, { - "consumer": 9, + "consumer": 5, + "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": 4, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 6, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -11499,14 +51357,14 @@ ] ] }, - "producer": 8, + "producer": 1, "role": "Input", "window": "NotApplicable" }, { - "consumer": 10, + "consumer": 7, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "grouping": "NotApplicable", @@ -11515,20 +51373,55 @@ "fields": [ { "dtype": { - "Plain": "timestamp" + "Plain": "utf8" }, - "name": "ts", - "nullable": false, + "name": "job", + "nullable": true, "table": null }, { "dtype": { - "Plain": "float64" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "value", + "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": "utf8" @@ -11541,20 +51434,19 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 9, + "producer": 7, "role": "Input", "window": "NotApplicable" } @@ -12061,25 +51953,6 @@ "output_schema": { "closed": true, "fields": [ - { - "dtype": { - "Plain": "timestamp" - }, - "name": "ts", - "nullable": false, - "table": null - }, - { - "dtype": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "name": "state", - "nullable": false, - "table": null - }, { "dtype": { "Plain": "utf8" @@ -12090,17 +51963,29 @@ }, { "dtype": { - "Plain": "utf8" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "$promql_series_identity", + "name": "state", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -12114,67 +51999,53 @@ "SummaryAgg": { "child": 1, "family": { - "ExactAggregate": [ - "Sum", - "Sum" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" ] }, "filter": null, "grouping": "PerSubpopulationInstance", "input": { - "item": null, + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, "weight": { "Column": "SampleValue" }, "weight_domain": { - "kind": "unknown_or_signed" + "kind": "samples_of_metric", + "metric": "http_requests_total" } }, - "reduction": "PerEntity" + "reduction": { + "Reduce": [ + 2 + ] + } } } } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "id": 7, "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" @@ -12187,15 +52058,14 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -12206,141 +52076,24 @@ }, "payload": { "ASAP": { - "FinalizeExactAccumulator": { - "child": 6 - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "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": { - "Sort": { - "child": 7, - "keys": [ - { - "ascending": false, - "expr": { - "Column": 1 - }, - "nulls_first": false + "SummaryEstimate": { + "query": { + "TopK": { + "k": 10 } - ], - "partition_by": [ - 2 - ] + }, + "summary_input": 6 } } } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 9, + "guarantee": null, + "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" @@ -12353,15 +52106,14 @@ "dtype": { "Plain": "utf8" }, - "name": "$promql_series_identity", + "name": "topk_10", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] @@ -12370,76 +52122,15 @@ "primitive": "Raw", "timing": "query_time" }, - "payload": { - "NonASAP": { - "Limit": { - "child": 8, - "n": 10, - "offset": 0, - "partition_by": [ - 2 - ] - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 10, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "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": 9, + "child": 7, "cols": [ { "alias": "job", "expr": { - "Column": 2 + "Column": 0 } }, { @@ -12457,13 +52148,13 @@ ], "roots": [ 5, - 10 + 8 ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 exact (Sum acc) · shared Scan #1, TimeRange #2", - "from_logical": "L3", - "id": "P3" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1, TimeRange #2", + "from_logical": "L21", + "id": "P21" }, { "dag": { @@ -12519,61 +52210,64 @@ ] ] }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, "producer": 1, "role": "Input", "window": "NotApplicable" @@ -12864,13 +52558,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -13060,24 +52754,7 @@ } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "id": 1, "materialization": "NotMaterialized", "output_schema": { @@ -13093,9 +52770,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -13125,18 +52805,33 @@ ] }, "output_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "payload": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } } @@ -13198,26 +52893,10 @@ }, "payload": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } } @@ -13654,13 +53333,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -13690,13 +53369,13 @@ "family": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -13841,9 +53520,9 @@ ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap", - "from_logical": "L4", - "id": "P4" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes", + "from_logical": "L22", + "id": "P22" }, { "dag": { @@ -13906,7 +53585,7 @@ { "consumer": 2, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "grouping": "NotApplicable", @@ -13923,9 +53602,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -14244,13 +53926,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -14440,24 +54122,7 @@ } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "id": 1, "materialization": "NotMaterialized", "output_schema": { @@ -14473,9 +54138,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -14505,18 +54173,33 @@ ] }, "output_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "payload": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } } @@ -14578,26 +54261,10 @@ }, "payload": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } } @@ -14908,13 +54575,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -14944,13 +54611,13 @@ "family": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -15095,9 +54762,9 @@ ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1", - "from_logical": "L5", - "id": "P5" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes · shared Scan #1", + "from_logical": "L23", + "id": "P23" }, { "dag": { @@ -15367,7 +55034,7 @@ "window": "NotApplicable" }, { - "consumer": 6, + "consumer": 7, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -15417,12 +55084,12 @@ ] ] }, - "producer": 1, + "producer": 6, "role": "Input", "window": "NotApplicable" }, { - "consumer": 7, + "consumer": 8, "data_state": { "primitive": "SummaryState", "timing": "query_time" @@ -15443,13 +55110,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -15468,12 +55135,63 @@ ] ] }, - "producer": 6, + "producer": 7, "role": "Input", "window": "NotApplicable" }, { - "consumer": 8, + "consumer": 9, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "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" @@ -15506,7 +55224,7 @@ ] ] }, - "producer": 7, + "producer": 9, "role": "Input", "window": "NotApplicable" } @@ -16007,9 +55725,135 @@ } }, { - "guarantee": null, + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact over exact inputs" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, "id": 6, "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": "http_requests_total" + } + } + } + } + } + }, + { + "guarantee": null, + "id": 7, + "materialization": "NotMaterialized", "output_schema": { "closed": true, "fields": [ @@ -16025,13 +55869,13 @@ "dtype": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -16056,18 +55900,18 @@ }, "payload": { "ASAP": { - "SummaryAgg": { - "child": 1, + "PaneChain": { + "child": 6, "family": { "Sketch": [ { - "algorithm": "CmsWithHeap", + "algorithm": "CountSketchWithHeap", "category": "TopK", "params": { - "CmsWithHeap": { - "depth": 7, + "CountSketchWithHeap": { + "depth": 149, "heap_size": 100, - "width": 272 + "width": 30000 } } }, @@ -16090,6 +55934,8 @@ "metric": "http_requests_total" } }, + "pane_count": 6, + "pane_width_ms": 10000, "reduction": { "Reduce": [ 2 @@ -16101,7 +55947,65 @@ }, { "guarantee": null, - "id": 7, + "id": 8, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + } + }, + { + "guarantee": null, + "id": 9, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -16142,14 +56046,14 @@ "k": 10 } }, - "summary_input": 6 + "summary_input": 8 } } } }, { "guarantee": null, - "id": 8, + "id": 10, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -16185,7 +56089,7 @@ "payload": { "NonASAP": { "Project": { - "child": 7, + "child": 9, "cols": [ { "alias": "job", @@ -16208,13 +56112,13 @@ ], "roots": [ 5, - 8 + 10 ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CMS+heap · shared Scan #1, TimeRange #2", - "from_logical": "L6", - "id": "P6" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · CountSketch+heap for Q2 in 6 × 10s panes", + "from_logical": "L24", + "id": "P24" }, { "dag": { @@ -16484,7 +56388,7 @@ "window": "NotApplicable" }, { - "consumer": 7, + "consumer": 6, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -16534,36 +56438,20 @@ ] ] }, - "producer": 6, + "producer": 0, "role": "Input", "window": "NotApplicable" }, { - "consumer": 8, + "consumer": 7, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "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" @@ -16574,27 +56462,39 @@ }, { "dtype": { - "Plain": "utf8" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "$promql_series_identity", + "name": "state", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 7, + "producer": 6, "role": "Input", "window": "NotApplicable" }, { - "consumer": 9, + "consumer": 8, "data_state": { "primitive": "SummaryState", "timing": "query_time" @@ -16640,12 +56540,12 @@ ] ] }, - "producer": 8, + "producer": 7, "role": "Input", "window": "NotApplicable" }, { - "consumer": 10, + "consumer": 9, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -16678,7 +56578,7 @@ ] ] }, - "producer": 9, + "producer": 8, "role": "Input", "window": "NotApplicable" } @@ -17091,353 +56991,145 @@ "payload": { "ASAP": { "SummaryAgg": { - "child": 3, - "family": { - "ExactAggregate": [ - "Sum", - "Sum" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact accumulator over exact input" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 5, - "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": 4 - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 6, - "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": "http_requests_total" - } - } - } - } - } - }, - { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, - "id": 7, - "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": 6, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } - } - } - } - }, - { - "guarantee": null, - "id": 8, - "materialization": "NotMaterialized", - "output_schema": { - "closed": true, - "fields": [ - { - "dtype": { - "Plain": "utf8" - }, - "name": "job", - "nullable": true, - "table": null - }, - { - "dtype": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 149, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "name": "state", - "nullable": false, - "table": null - } - ], - "time_index": null, - "unique_keys": [ - [ - 0 - ] - ] - }, - "output_state": { - "primitive": "SummaryState", - "timing": "query_time" - }, - "payload": { - "ASAP": { - "SummaryAgg": { - "child": 7, + "child": 3, + "family": { + "ExactAggregate": [ + "Sum", + "Sum" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": { + "provenance": [ + { + "kind": "exact", + "reason": "exact accumulator over exact input" + } + ], + "spec": { + "error": { + "op": "zero" + }, + "failure_probability": { + "op": "zero" + }, + "metric": "absolute", + "scope": "per_value" + } + }, + "id": 5, + "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": 4 + } + } + } + }, + { + "guarantee": null, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, "family": { "Sketch": [ { @@ -17470,6 +57162,8 @@ "metric": "http_requests_total" } }, + "pane_count": 6, + "pane_width_ms": 10000, "reduction": { "Reduce": [ 2 @@ -17481,7 +57175,65 @@ }, { "guarantee": null, - "id": 9, + "id": 7, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 6 + ] + } + } + } + }, + { + "guarantee": null, + "id": 8, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -17522,14 +57274,14 @@ "k": 10 } }, - "summary_input": 8 + "summary_input": 7 } } } }, { "guarantee": null, - "id": 10, + "id": 9, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -17565,7 +57317,7 @@ "payload": { "NonASAP": { "Project": { - "child": 9, + "child": 8, "cols": [ { "alias": "job", @@ -17588,13 +57340,13 @@ ], "roots": [ 5, - 10 + 9 ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap", - "from_logical": "L7", - "id": "P7" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · CountSketch+heap for Q2 in 6 × 10s panes · shared Scan #1", + "from_logical": "L25", + "id": "P25" }, { "dag": { @@ -17657,7 +57409,7 @@ { "consumer": 2, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "grouping": "NotApplicable", @@ -17674,9 +57426,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -17864,7 +57619,7 @@ "window": "NotApplicable" }, { - "consumer": 6, + "consumer": 7, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -17914,36 +57669,20 @@ ] ] }, - "producer": 0, + "producer": 6, "role": "Input", "window": "NotApplicable" }, { - "consumer": 7, + "consumer": 8, "data_state": { - "primitive": "Raw", + "primitive": "SummaryState", "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" @@ -17954,27 +57693,39 @@ }, { "dtype": { - "Plain": "utf8" + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] }, - "name": "$promql_series_identity", + "name": "state", "nullable": false, "table": null } ], - "time_index": 0, + "time_index": null, "unique_keys": [ [ - 3, 0 ] ] }, - "producer": 6, + "producer": 7, "role": "Input", "window": "NotApplicable" }, { - "consumer": 8, + "consumer": 9, "data_state": { "primitive": "SummaryState", "timing": "query_time" @@ -18020,12 +57771,12 @@ ] ] }, - "producer": 7, + "producer": 8, "role": "Input", "window": "NotApplicable" }, { - "consumer": 9, + "consumer": 10, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -18058,7 +57809,7 @@ ] ] }, - "producer": 8, + "producer": 9, "role": "Input", "window": "NotApplicable" } @@ -18191,24 +57942,7 @@ } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "id": 1, "materialization": "NotMaterialized", "output_schema": { @@ -18224,9 +57958,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -18256,18 +57993,33 @@ ] }, "output_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "payload": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } } @@ -18329,26 +58081,10 @@ }, "payload": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } } @@ -18629,12 +58365,56 @@ }, "payload": { "NonASAP": { - "TimeRange": { - "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 + "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": "http_requests_total" + } } } } @@ -18690,7 +58470,7 @@ }, "payload": { "ASAP": { - "SummaryAgg": { + "PaneChain": { "child": 6, "family": { "Sketch": [ @@ -18724,6 +58504,8 @@ "metric": "http_requests_total" } }, + "pane_count": 6, + "pane_width_ms": 10000, "reduction": { "Reduce": [ 2 @@ -18737,6 +58519,64 @@ "guarantee": null, "id": 8, "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "SummaryMerge": { + "children": [ + 7 + ] + } + } + } + }, + { + "guarantee": null, + "id": 9, + "materialization": "NotMaterialized", "output_schema": { "closed": true, "fields": [ @@ -18776,14 +58616,14 @@ "k": 10 } }, - "summary_input": 7 + "summary_input": 8 } } } }, { "guarantee": null, - "id": 9, + "id": 10, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -18819,7 +58659,7 @@ "payload": { "NonASAP": { "Project": { - "child": 8, + "child": 9, "cols": [ { "alias": "job", @@ -18842,13 +58682,13 @@ ], "roots": [ 5, - 9 + 10 ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1", - "from_logical": "L8", - "id": "P8" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes, CountSketch+heap for Q2 in 6 × 10s panes", + "from_logical": "L26", + "id": "P26" }, { "dag": { @@ -18904,61 +58744,64 @@ ] ] }, - "producer": 0, - "role": "Input", - "window": "NotApplicable" - }, - { - "consumer": 2, - "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": 0, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 2, + "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": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Plain": "utf8" + }, + "name": "$promql_series_identity", + "nullable": false, + "table": null + } + ], + "time_index": 0, + "unique_keys": [ + [ + 3, + 0 + ] + ] + }, "producer": 1, "role": "Input", "window": "NotApplicable" @@ -19168,7 +59011,7 @@ ] ] }, - "producer": 1, + "producer": 0, "role": "Input", "window": "NotApplicable" }, @@ -19225,6 +59068,57 @@ }, { "consumer": 8, + "data_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "grouping": "NotApplicable", + "intermediate_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "producer": 7, + "role": "Input", + "window": "NotApplicable" + }, + { + "consumer": 9, "data_state": { "primitive": "Raw", "timing": "query_time" @@ -19257,7 +59151,7 @@ ] ] }, - "producer": 7, + "producer": 8, "role": "Input", "window": "NotApplicable" } @@ -19390,24 +59284,7 @@ } }, { - "guarantee": { - "provenance": [ - { - "kind": "exact", - "reason": "exact over exact inputs" - } - ], - "spec": { - "error": { - "op": "zero" - }, - "failure_probability": { - "op": "zero" - }, - "metric": "absolute", - "scope": "per_value" - } - }, + "guarantee": null, "id": 1, "materialization": "NotMaterialized", "output_schema": { @@ -19423,9 +59300,12 @@ }, { "dtype": { - "Plain": "float64" + "ExactAggregate": [ + "Rate", + "Rate" + ] }, - "name": "value", + "name": "state", "nullable": false, "table": null }, @@ -19455,18 +59335,33 @@ ] }, "output_state": { - "primitive": "Raw", + "primitive": "SummaryState", "timing": "query_time" }, "payload": { - "NonASAP": { - "TimeRange": { + "ASAP": { + "PaneChain": { "child": 0, - "kind": "range", - "range": { - "nanos": 0, - "secs": 60 - } + "family": { + "ExactAggregate": [ + "Rate", + "Rate" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": null, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "unknown_or_signed" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": "PerEntity" } } } @@ -19528,26 +59423,10 @@ }, "payload": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "ExactAggregate": [ - "Rate", - "Rate" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": null, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "unknown_or_signed" - } - }, - "reduction": "PerEntity" + "SummaryMerge": { + "children": [ + 1 + ] } } } @@ -19759,7 +59638,102 @@ }, { "guarantee": null, - "id": 6, + "id": 6, + "materialization": "NotMaterialized", + "output_schema": { + "closed": true, + "fields": [ + { + "dtype": { + "Plain": "utf8" + }, + "name": "job", + "nullable": true, + "table": null + }, + { + "dtype": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "name": "state", + "nullable": false, + "table": null + } + ], + "time_index": null, + "unique_keys": [ + [ + 0 + ] + ] + }, + "output_state": { + "primitive": "SummaryState", + "timing": "query_time" + }, + "payload": { + "ASAP": { + "PaneChain": { + "child": 0, + "family": { + "Sketch": [ + { + "algorithm": "CountSketchWithHeap", + "category": "TopK", + "params": { + "CountSketchWithHeap": { + "depth": 149, + "heap_size": 100, + "width": 30000 + } + } + }, + "PerSubpopulationInstance" + ] + }, + "filter": null, + "grouping": "PerSubpopulationInstance", + "input": { + "item": { + "Column": { + "Named": "$promql_series_identity" + } + }, + "weight": { + "Column": "SampleValue" + }, + "weight_domain": { + "kind": "samples_of_metric", + "metric": "http_requests_total" + } + }, + "pane_count": 6, + "pane_width_ms": 10000, + "reduction": { + "Reduce": [ + 2 + ] + } + } + } + } + }, + { + "guarantee": null, + "id": 7, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -19807,52 +59781,17 @@ }, "payload": { "ASAP": { - "SummaryAgg": { - "child": 1, - "family": { - "Sketch": [ - { - "algorithm": "CountSketchWithHeap", - "category": "TopK", - "params": { - "CountSketchWithHeap": { - "depth": 149, - "heap_size": 100, - "width": 30000 - } - } - }, - "PerSubpopulationInstance" - ] - }, - "filter": null, - "grouping": "PerSubpopulationInstance", - "input": { - "item": { - "Column": { - "Named": "$promql_series_identity" - } - }, - "weight": { - "Column": "SampleValue" - }, - "weight_domain": { - "kind": "samples_of_metric", - "metric": "http_requests_total" - } - }, - "reduction": { - "Reduce": [ - 2 - ] - } + "SummaryMerge": { + "children": [ + 6 + ] } } } }, { "guarantee": null, - "id": 7, + "id": 8, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -19893,14 +59832,14 @@ "k": 10 } }, - "summary_input": 6 + "summary_input": 7 } } } }, { "guarantee": null, - "id": 8, + "id": 9, "materialization": "NotMaterialized", "output_schema": { "closed": true, @@ -19936,7 +59875,7 @@ "payload": { "NonASAP": { "Project": { - "child": 7, + "child": 8, "cols": [ { "alias": "job", @@ -19959,13 +59898,13 @@ ], "roots": [ 5, - 8 + 9 ], "scalar_roots": [] }, - "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · shared Scan #1, TimeRange #2", - "from_logical": "L9", - "id": "P9" + "display_name": "Q1 exact (Sum acc, Rate acc) · Q2 CountSketch+heap · Rate acc for Q1 in 6 × 10s panes, CountSketch+heap for Q2 in 6 × 10s panes · shared Scan #1", + "from_logical": "L27", + "id": "P27" } ], "pruned": [] @@ -19981,7 +59920,7 @@ }, "1": { "cost": 0.4, - "detail": "time range 60s: pass 4000000 rows; x 0.1000/s", + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", "multiplier": 1 }, "10": { @@ -20026,7 +59965,7 @@ }, "7": { "cost": 0.4, - "detail": "time range 60s: pass 4000000 rows; x 0.1000/s", + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", "multiplier": 1 }, "8": { @@ -20053,7 +59992,7 @@ }, "1": { "cost": 0.4, - "detail": "time range 60s: pass 4000000 rows; x 0.1000/s", + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", "multiplier": 1 }, "10": { @@ -20088,7 +60027,7 @@ }, "6": { "cost": 0.4, - "detail": "time range 60s: pass 4000000 rows; x 0.1000/s", + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", "multiplier": 1 }, "7": { @@ -20120,7 +60059,7 @@ }, "1": { "cost": 0.8, - "detail": "time range 60s: pass 4000000 rows; x 0.2000/s", + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.2000/s", "multiplier": 2 }, "10": { @@ -20172,36 +60111,513 @@ "source": "analytical-cost-v2 (illustrative statistics)", "total": 7.940209999999999, "unit": "cost_per_second" + }, + "P4": { + "per_node": { + "0": { + "cost": 2.32, + "detail": "scan 4000000 samples; x 0.1000/s", + "multiplier": 1 + }, + "1": { + "cost": 0.8, + "detail": "build exact Rate accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "10": { + "cost": 1.4000000000000001, + "detail": "sort 1000000 rows in 100 partitions; x 0.1000/s", + "multiplier": 1 + }, + "11": { + "cost": 0.0001, + "detail": "limit to 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "12": { + "cost": 0.0001, + "detail": "operator: pass 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "2": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "3": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "4": { + "cost": 0.1, + "detail": "build exact Sum accumulator into 100 states: 1000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "5": { + "cost": 9.999999999999999e-6, + "detail": "finalize 100 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "6": { + "cost": 2.32, + "detail": "scan 4000000 samples; x 0.1000/s", + "multiplier": 1 + }, + "7": { + "cost": 0.4, + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", + "multiplier": 1 + }, + "8": { + "cost": 0.4, + "detail": "build exact Sum accumulator into 1000000 states: 4000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "9": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + } + }, + "source": "analytical-cost-v2 (illustrative statistics)", + "total": 8.54021, + "unit": "cost_per_second" + }, + "P5": { + "per_node": { + "0": { + "cost": 4.64, + "detail": "scan 4000000 samples; x 0.2000/s", + "multiplier": 2 + }, + "1": { + "cost": 0.8, + "detail": "build exact Rate accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "10": { + "cost": 0.0001, + "detail": "limit to 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "11": { + "cost": 0.0001, + "detail": "operator: pass 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "2": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "3": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "4": { + "cost": 0.1, + "detail": "build exact Sum accumulator into 100 states: 1000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "5": { + "cost": 9.999999999999999e-6, + "detail": "finalize 100 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "6": { + "cost": 0.4, + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", + "multiplier": 1 + }, + "7": { + "cost": 0.4, + "detail": "build exact Sum accumulator into 1000000 states: 4000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "8": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "9": { + "cost": 1.4000000000000001, + "detail": "sort 1000000 rows in 100 partitions; x 0.1000/s", + "multiplier": 1 + } + }, + "source": "analytical-cost-v2 (illustrative statistics)", + "total": 8.540209999999998, + "unit": "cost_per_second" + }, + "P6": { + "per_node": { + "0": { + "cost": 2.32, + "detail": "scan 4000000 samples; x 0.1000/s", + "multiplier": 1 + }, + "1": { + "cost": 0.4, + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", + "multiplier": 1 + }, + "10": { + "cost": 1.4000000000000001, + "detail": "sort 1000000 rows in 100 partitions; x 0.1000/s", + "multiplier": 1 + }, + "11": { + "cost": 0.0001, + "detail": "limit to 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "12": { + "cost": 0.0001, + "detail": "operator: pass 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "2": { + "cost": 0.4, + "detail": "build exact Rate accumulator into 1000000 states: 4000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "3": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "4": { + "cost": 0.1, + "detail": "build exact Sum accumulator into 100 states: 1000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "5": { + "cost": 9.999999999999999e-6, + "detail": "finalize 100 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "6": { + "cost": 2.32, + "detail": "scan 4000000 samples; x 0.1000/s", + "multiplier": 1 + }, + "7": { + "cost": 0.8, + "detail": "build exact Sum accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "8": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "9": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + } + }, + "source": "analytical-cost-v2 (illustrative statistics)", + "total": 8.54021, + "unit": "cost_per_second" + }, + "P7": { + "per_node": { + "0": { + "cost": 4.64, + "detail": "scan 4000000 samples; x 0.2000/s", + "multiplier": 2 + }, + "1": { + "cost": 0.4, + "detail": "time range 60s: keep 4000000 of 4000000 rows; x 0.1000/s", + "multiplier": 1 + }, + "10": { + "cost": 0.0001, + "detail": "limit to 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "11": { + "cost": 0.0001, + "detail": "operator: pass 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "2": { + "cost": 0.4, + "detail": "build exact Rate accumulator into 1000000 states: 4000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "3": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "4": { + "cost": 0.1, + "detail": "build exact Sum accumulator into 100 states: 1000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "5": { + "cost": 9.999999999999999e-6, + "detail": "finalize 100 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "6": { + "cost": 0.8, + "detail": "build exact Sum accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "7": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "8": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "9": { + "cost": 1.4000000000000001, + "detail": "sort 1000000 rows in 100 partitions; x 0.1000/s", + "multiplier": 1 + } + }, + "source": "analytical-cost-v2 (illustrative statistics)", + "total": 8.540209999999998, + "unit": "cost_per_second" + }, + "P8": { + "per_node": { + "0": { + "cost": 2.32, + "detail": "scan 4000000 samples; x 0.1000/s", + "multiplier": 1 + }, + "1": { + "cost": 0.8, + "detail": "build exact Rate accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "10": { + "cost": 1.4000000000000001, + "detail": "sort 1000000 rows in 100 partitions; x 0.1000/s", + "multiplier": 1 + }, + "11": { + "cost": 0.0001, + "detail": "limit to 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "12": { + "cost": 0.0001, + "detail": "operator: pass 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "2": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "3": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "4": { + "cost": 0.1, + "detail": "build exact Sum accumulator into 100 states: 1000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "5": { + "cost": 9.999999999999999e-6, + "detail": "finalize 100 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "6": { + "cost": 2.32, + "detail": "scan 4000000 samples; x 0.1000/s", + "multiplier": 1 + }, + "7": { + "cost": 0.8, + "detail": "build exact Sum accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "8": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "9": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + } + }, + "source": "analytical-cost-v2 (illustrative statistics)", + "total": 9.14021, + "unit": "cost_per_second" + }, + "P9": { + "per_node": { + "0": { + "cost": 4.64, + "detail": "scan 4000000 samples; x 0.2000/s", + "multiplier": 2 + }, + "1": { + "cost": 0.8, + "detail": "build exact Rate accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "10": { + "cost": 0.0001, + "detail": "limit to 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "11": { + "cost": 0.0001, + "detail": "operator: pass 1000 rows; x 0.1000/s", + "multiplier": 1 + }, + "2": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "3": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "4": { + "cost": 0.1, + "detail": "build exact Sum accumulator into 100 states: 1000000 rows x depth 1; x 0.1000/s", + "multiplier": 1 + }, + "5": { + "cost": 9.999999999999999e-6, + "detail": "finalize 100 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "6": { + "cost": 0.8, + "detail": "build exact Sum accumulator in 6 panes of 10000 ms for 1000000 groups: 4000000 rows x (1 + depth 1); x 0.1000/s", + "multiplier": 1 + }, + "7": { + "cost": 0.6000000000000001, + "detail": "merge 6000000 states into 1000000; x 0.1000/s", + "multiplier": 1 + }, + "8": { + "cost": 0.1, + "detail": "finalize 1000000 accumulators; x 0.1000/s", + "multiplier": 1 + }, + "9": { + "cost": 1.4000000000000001, + "detail": "sort 1000000 rows in 100 partitions; x 0.1000/s", + "multiplier": 1 + } + }, + "source": "analytical-cost-v2 (illustrative statistics)", + "total": 9.140209999999998, + "unit": "cost_per_second" } }, "rejected": [ { - "id": "P4", + "id": "P10", "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", "valid": false }, { - "id": "P5", + "id": "P11", "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", "valid": false }, { - "id": "P6", + "id": "P12", "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", "valid": false }, { - "id": "P7", + "id": "P13", "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", "valid": false }, { - "id": "P8", + "id": "P14", "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", "valid": false }, { - "id": "P9", + "id": "P15", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P16", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P17", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P18", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P19", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P20", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P21", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P22", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P23", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P24", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P25", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P26", + "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", + "valid": false + }, + { + "id": "P27", "reason": "q2: the output has no guarantee, and the deployment has no evidence that it meets target AccuracySpec { metric: Absolute { scale: Some(StreamL1) }, error: 0.01, failure_probability: Some(0.001), scope: WholeResult }", "valid": false }, @@ -20214,6 +60630,36 @@ "id": "P3", "reason": "tied with the selected candidate P1 at 7.940 cost_per_second; lost on enumeration order", "valid": true + }, + { + "id": "P4", + "reason": "costlier: 8.540 vs 7.940 cost_per_second", + "valid": true + }, + { + "id": "P5", + "reason": "costlier: 8.540 vs 7.940 cost_per_second", + "valid": true + }, + { + "id": "P6", + "reason": "costlier: 8.540 vs 7.940 cost_per_second", + "valid": true + }, + { + "id": "P7", + "reason": "costlier: 8.540 vs 7.940 cost_per_second", + "valid": true + }, + { + "id": "P8", + "reason": "costlier: 9.140 vs 7.940 cost_per_second", + "valid": true + }, + { + "id": "P9", + "reason": "costlier: 9.140 vs 7.940 cost_per_second", + "valid": true } ], "selected": "P1" diff --git a/tools/dag-viewer/node-style.js b/tools/dag-viewer/node-style.js index 0b1adf383..a39f32aaf 100644 --- a/tools/dag-viewer/node-style.js +++ b/tools/dag-viewer/node-style.js @@ -30,6 +30,7 @@ const KIND_CATEGORY_JSON = `{ "SummaryDelete": "summary", "SummaryEstimate": "summary", "SummaryMerge": "summary", + "PaneChain": "summary", "FinalizeExactAccumulator": "summary", "MaintainPopulation": "summary", "EvaluatePopulation": "summary",