pub struct AggregateRequest {Show 21 fields
pub labels: Vec<String>,
pub where_: Option<Expr>,
pub related: Vec<RelatedSpec>,
pub group_by: Vec<String>,
pub sums: Vec<(String, String)>,
pub counts: Vec<(String, String)>,
pub mins: Vec<(String, String)>,
pub maxs: Vec<(String, String)>,
pub time_bucket: Option<TimeBucketSpec>,
pub outputs: Vec<(String, OutputExpr)>,
pub expr_sums: Vec<(String, OutputExpr)>,
pub expr_avgs: Vec<(String, OutputExpr)>,
pub avg_terms: Vec<(String, String)>,
pub avg_precision: BTreeMap<String, u32>,
pub time_bucket_alias: Option<String>,
pub plain_fields: Vec<(String, String)>,
pub collects: Vec<CollectSpec>,
pub order_by: Vec<(String, bool)>,
pub skip: u64,
pub limit: Option<u64>,
pub hidden_outputs: BTreeSet<String>,
}Expand description
A branch-grain aggregation request over distinct roots.
Fields§
§labels: Vec<String>Labels a root record must carry; empty matches every label.
where_: Option<Expr>Boolean predicate the root record must satisfy.
Independent traversal branches filtering the roots existentially.
group_by: Vec<String>Group key field names ($record.field-style without prefix).
sums: Vec<(String, String)>Sum metrics keyed by output name -> source field.
counts: Vec<(String, String)>Distinct-root or distinct-entity counts keyed by output name;
"*" counts root identity per document 19 semantics.
mins: Vec<(String, String)>Min/max aggregates keyed by output name -> source field.
maxs: Vec<(String, String)>$max aggregates keyed by output name -> source field.
time_bucket: Option<TimeBucketSpec>Calendar dimension added to group keys when present.
outputs: Vec<(String, OutputExpr)>Derived outputs evaluated after all source metrics (doc 19).
expr_sums: Vec<(String, OutputExpr)>Per-root math expressions summed into an alias ($sum over math).
expr_avgs: Vec<(String, OutputExpr)>Per-root math expressions averaged into an alias ($avg over math).
avg_terms: Vec<(String, String)>Plain-field averages ($avg over a field ref): alias -> field.
avg_precision: BTreeMap<String, u32>Rounding precision per avg alias.
time_bucket_alias: Option<String>Alias under which the time-bucket dimension is emitted.
plain_fields: Vec<(String, String)>Plain field projections in listing mode.
collects: Vec<CollectSpec>Per-root $collect output shapes attached to each aggregate row
(the aggregate path mirrors the listing collect behavior).
order_by: Vec<(String, bool)>AggregateThenPaginate: sort completed buckets by output name.
skip: u64Number of completed buckets to skip after ordering.
limit: Option<u64>Maximum number of completed buckets to return; None = unbounded.
Compiler-generated source metrics used only by derived outputs.