Skip to main content

AggregateRequest

Struct AggregateRequest 

Source
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.

§related: Vec<RelatedSpec>

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: u64

Number of completed buckets to skip after ordering.

§limit: Option<u64>

Maximum number of completed buckets to return; None = unbounded.

§hidden_outputs: BTreeSet<String>

Compiler-generated source metrics used only by derived outputs.

Trait Implementations§

Source§

impl Clone for AggregateRequest

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AggregateRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AggregateRequest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.