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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/accuracy/src/estimators/hll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! This is conditional on independent uniform bucket hashes and an enforced
//! upper bound on distinct items in the complete evaluation population (including
//! all merged panes). It is not an RSE-to-normal conversion or an ERP fit.
//! all merged tumbling windows). It is not an RSE-to-normal conversion or an ERP fit.

use super::*;

Expand Down Expand Up @@ -106,7 +106,7 @@ pub(crate) fn classic_guarantee(
"max_distinct": format!("{MAX_DISTINCT}[{source}]"),
"relative_error": relative_error,
"hash_assumption": "independent_uniform_buckets",
"population_scope": "complete_evaluation_including_merged_panes"}),
"population_scope": "complete_evaluation_including_merged_tumbling_windows"}),
query: "Cardinality".into(),
}],
))
Expand Down Expand Up @@ -170,7 +170,7 @@ impl ClassicHllConfidence {
params: serde_json::json!({"precision": precision,
"max_distinct": self.max_distinct, "relative_error": self.relative_error,
"hash_assumption": "independent_uniform_buckets",
"population_scope": "complete_evaluation_including_merged_panes"}),
"population_scope": "complete_evaluation_including_merged_tumbling_windows"}),
query: "Cardinality".into(),
}],
))
Expand Down
2 changes: 1 addition & 1 deletion crates/accuracy/src/estimators/univmon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ pub(crate) fn distinct_guarantee(params: &SketchParams, source: &str) -> Option<
"variance": "1.35 F0^2 / k",
"hash_assumption": "independent_uniform_layer_hashes",
"mode": "standard",
"population_scope": "complete_evaluation_including_merged_panes"}),
"population_scope": "complete_evaluation_including_merged_tumbling_windows"}),
query: "Cardinality".into(),
}],
))
Expand Down
22 changes: 11 additions & 11 deletions crates/accuracy/src/propagation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::collections::{HashMap, HashSet};
use std::rc::Rc;

use asap_types::ir::operator::operator_properties::{BinaryOpKind, JoinKind, Reduction, Source};
use asap_types::ir::operator::pane_chain::{merged_chain, merged_window_build};
use asap_types::ir::operator::tumbling_window_chain::{merged_chain, merged_window_build};
use asap_types::ir::operator::AggIntent;
use asap_types::ir::properties::guarantee::{
AccuracyGuarantee, AccuracyMetric, BoundExpr, CompositionOperator, GuaranteeSource,
Expand Down Expand Up @@ -406,7 +406,7 @@ pub fn composed_guarantee(node: &OperatorNode) -> Option<AccuracyGuarantee> {
if let Some(guarantee) = rolled_up_guarantee(node) {
return guarantee;
}
if let Some(guarantee) = merged_panes_guarantee(node) {
if let Some(guarantee) = merged_tumbling_windows_guarantee(node) {
return guarantee;
}
let exact = |node: &OperatorNode| {
Expand Down Expand Up @@ -610,14 +610,14 @@ fn rolled_up_guarantee(node: &OperatorNode) -> Option<Option<AccuracyGuarantee>>
}

/// 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 merged panes' window ([`merged_window_build`]: the whole
/// chain's, or its newest panes') when the
/// tumbling windows ([`merged_chain`]): the guarantee of the same read of one
/// build over the merged tumbling windows' time range ([`merged_window_build`]: the whole
/// chain's, or its newest tumbling windows') 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<Option<AccuracyGuarantee>> {
/// any node that does not read merged tumbling windows.
fn merged_tumbling_windows_guarantee(node: &OperatorNode) -> Option<Option<AccuracyGuarantee>> {
let (state, merged) = match node.asap()? {
ASAPOp::SummaryEstimate {
summary_input,
Expand Down Expand Up @@ -647,7 +647,7 @@ fn merged_panes_guarantee(node: &OperatorNode) -> Option<Option<AccuracyGuarante
let Ok(mut window_build) = merged_window_build(state) else {
return Some(None);
};
// The merged panes' window range over the chain's input carries the
// The merged tumbling windows' time range over the chain's input carries the
// guarantee composed over that input.
let ASAPOp::SummaryTumblingWindowChain { child: input, .. } = chain.asap()? else {
return Some(None);
Expand Down Expand Up @@ -750,7 +750,7 @@ pub(crate) fn fold_stats(
/// heap estimate whose update weights carry the
/// [`WeightDomain::RawDataSamplesOfMetric`] requirement keep it, and so does a
/// quantile estimate of those values, built over the raw window or merged
/// from its tumbling panes: it is one of them, or between two of them, so it
/// from its tumbling windows: it is one of them, or between two of them, so it
/// shares their sign. Anything else (rate, arithmetic, other
/// functions) ends it. Only the sign of the values is read from it.
pub(crate) fn estimates_raw_data_samples_of(node: &OperatorNode) -> Option<String> {
Expand All @@ -771,9 +771,9 @@ pub(crate) fn estimates_raw_data_samples_of(node: &OperatorNode) -> Option<Strin
_ => None,
},
// Only a φ in [0, 1] picks one of the values; outside it the answer
// is -Inf or +Inf, whatever their sign. Merged tumbling panes of one
// is -Inf or +Inf, whatever their sign. Merged tumbling windows of one
// definition ([`merged_chain`]) are read through their `SummaryTumblingWindowChain`:
// a quantile of the merged state is still one of the panes'
// a quantile of the merged state is still one of the tumbling windows'
// samples, or between two of them.
Operator::ASAP(ASAPOp::SummaryEstimate {
summary_input,
Expand Down
2 changes: 1 addition & 1 deletion crates/cost/src/execution_demand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub fn consumers(dag: &PhysicalASAPDAG) -> HashMap<PhysicalASAPNodeId, Vec<Consu
/// its readers: once per second at ingestion time (`MatAtIngestion`), at
/// the combined rate of the queries reaching it (`MatAtQuery`,
/// [`evaluation_rate`]), or once per request of those queries for a chain
/// kept across evaluations, whose request builds only its newest pane
/// kept across evaluations, whose request builds only its newest tumbling window
/// however many range steps it evaluates. `range_evaluations[q]` is query
/// `q`'s range evaluation (none when missing). A `NotMaterialized` node is computed once per
/// consumer that reaches it ([`consumers`]), at that consumer's rate. A consumer is a query
Expand Down
6 changes: 3 additions & 3 deletions crates/cost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ pub use measured::{
pub use operator_statistics::EdgeStatistics;
pub use ranking::{cheaper, worst_latency_ms, PlanRanking};
pub use usage::{
family_name, kept_pane_chains, node_map, node_usage, panes_of, plan_cost, query_reach,
trailing_window, tumbling_window_retention_ms, tumbling_window_retention_ms_of_plan, NodeMap,
NodeUsage, ProducerOutput,
family_name, kept_tumbling_window_chains, node_map, node_usage, plan_cost, query_reach,
trailing_window, tumbling_window_retention_ms, tumbling_window_retention_ms_of_plan,
tumbling_windows_of, NodeMap, NodeUsage, ProducerOutput,
};

/// Cost per second of wall time; one unit is one CPU-millisecond under
Expand Down
4 changes: 2 additions & 2 deletions crates/cost/src/measured.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ pub enum OperatorKind {
FinalizeExactAccumulator,
MaintainPopulation,
EvaluatePopulation,
/// Per input state merged (each pane of a chain is a state).
/// Per input state merged (each tumbling window of a chain is a state).
SummaryMerge,
/// Per input row placed in its pane and inserted into that pane's state.
/// Per input row placed in its tumbling window and inserted into that tumbling window's state.
// Named `PaneChain` before #1163.
#[serde(alias = "PaneChain")]
SummaryTumblingWindowChain,
Expand Down
2 changes: 1 addition & 1 deletion crates/cost/src/ranking.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! How a cost model orders valid plans ([`PlanRanking`]): Stage 3 ranks its
//! candidates with it, and the facade picks the best of its pane-width
//! candidates with it, and the facade picks the best of its tumbling-window-width
//! rounds' selections with it (#1047).
use std::cmp::Ordering;

Expand Down
6 changes: 3 additions & 3 deletions crates/cost/src/state_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ mod tests {

/// An exact accumulator's state is priced at the executor's per-group
/// state, 56 bytes for every kind (a counter's state alone is 48), so a
/// pane chain of exact sums keeps 56 bytes per pane and group.
/// tumbling-window chain of exact sums keeps 56 bytes per tumbling window and group.
#[test]
fn exact_state_is_priced_at_the_executors_state_size() {
use asap_types::ir::schema::{ExactKind, ExactParams};
Expand Down Expand Up @@ -320,7 +320,7 @@ mod tests {
)
.1
};
// Ten Pareto(2) samples (scale 1), one 1 s pane of a 10 Hz series.
// Ten Pareto(2) samples (scale 1), one 1 s tumbling window of a 10 Hz series.
let pareto: Vec<f64> = (0..10)
.map(|i| (1.0 - (f64::from(i) + 0.5) / 10.0).powf(-0.5))
.collect();
Expand Down Expand Up @@ -472,7 +472,7 @@ mod tests {
/// samples it sees, not its full capacity: its fixed struct and level
/// array, plus the item array the library starts empty and doubles from
/// 16 items as samples arrive, up to `compute_max_capacity(k, 8)`. E.g.
/// a 10 s pane of a series sampled every 15 s sees one sample: 744 + 128
/// a 10 s tumbling window of a series sampled every 15 s sees one sample: 744 + 128
/// = 872 bytes, where the full capacity at `k` = 269 is 1,206 items.
#[test]
fn kll_state_bytes_grow_with_the_samples_it_sees() {
Expand Down
Loading
Loading