Enum sql::plan::expr::AggregateFunc[][src]

pub enum AggregateFunc {
Show 37 variants MaxNumeric, MaxInt16, MaxInt32, MaxInt64, MaxFloat32, MaxFloat64, MaxBool, MaxString, MaxDate, MaxTimestamp, MaxTimestampTz, MinNumeric, MinInt16, MinInt32, MinInt64, MinFloat32, MinFloat64, MinBool, MinString, MinDate, MinTimestamp, MinTimestampTz, SumInt16, SumInt32, SumInt64, SumFloat32, SumFloat64, SumNumeric, Count, Any, All, JsonbAgg { order_by: Vec<ColumnOrder>, }, JsonbObjectAgg { order_by: Vec<ColumnOrder>, }, ArrayConcat { order_by: Vec<ColumnOrder>, }, ListConcat { order_by: Vec<ColumnOrder>, }, StringAgg { order_by: Vec<ColumnOrder>, }, Dummy,
}
Expand description

Aggregate functions analogous to expr::AggregateFunc, but whose types may be different.

Specifically, the nullability of the aggregate columns is more common here than in expr, as these aggregates may be applied over empty result sets and should be null in those cases, whereas expr variants only return null values when supplied nulls as input.

Variants

MaxNumeric

MaxInt16

MaxInt32

MaxInt64

MaxFloat32

MaxFloat64

MaxBool

MaxString

MaxDate

MaxTimestamp

MaxTimestampTz

MinNumeric

MinInt16

MinInt32

MinInt64

MinFloat32

MinFloat64

MinBool

MinString

MinDate

MinTimestamp

MinTimestampTz

SumInt16

SumInt32

SumInt64

SumFloat32

SumFloat64

SumNumeric

Count

Any

All

JsonbAgg

Fields

order_by: Vec<ColumnOrder>

Accumulates Datum::Lists whose first element is a JSON-typed Datums into a JSON list. The other elements are columns used by order_by.

WARNING: Unlike the jsonb_agg function that is exposed by the SQL layer, this function filters out Datum::Null, for consistency with the other aggregate functions.

JsonbObjectAgg

Fields

order_by: Vec<ColumnOrder>

Zips Datum::Lists whose first element is a JSON-typed Datums into a JSON map. The other elements are columns used by order_by.

ArrayConcat

Fields

order_by: Vec<ColumnOrder>

Accumulates Datum::Lists whose first element is a Datum::Array into a single Datum::Array. The other elements are columns used by order_by.

ListConcat

Fields

order_by: Vec<ColumnOrder>

Accumulates Datum::Lists whose first element is a Datum::List into a single Datum::List. The other elements are columns used by order_by.

StringAgg

Fields

order_by: Vec<ColumnOrder>

Dummy

Accumulates any number of Datum::Dummys into Datum::Dummy.

Useful for removing an expensive aggregation while maintaining the shape of a reduce operator.

Implementations

Converts the sql::AggregateFunc to a corresponding expr::AggregateFunc.

Returns a datum whose inclusion in the aggregation will not change its result.

The output column type for the result of an aggregation.

The output column type also contains nullability information, which is (without further information) true for aggregations that are not counts.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

The type of the output value.

A well-distributed integer derived from the data.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more