Enum expr::AggregateFunc [−][src]
pub enum AggregateFunc {
Show 38 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>,
},
RowNumber {
order_by: Vec<ColumnOrder>,
},
Dummy,
}
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::List
s whose first element is a JSON-typed Datum
s
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::List
s whose first element is a JSON-typed Datum
s into a
JSON map. The other elements are columns used by order_by
.
WARNING: Unlike the jsonb_object_agg
function that is exposed by the SQL
layer, this function filters out Datum::Null
, for consistency with
the other aggregate functions.
ArrayConcat
Fields
order_by: Vec<ColumnOrder>
Accumulates Datum::List
s 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::List
s of ScalarType::Record
whose first field is a Datum::List
into a single Datum::List
(the remaining fields are used by order_by
).
StringAgg
Fields
order_by: Vec<ColumnOrder>
RowNumber
Fields
order_by: Vec<ColumnOrder>
Dummy
Accumulates any number of Datum::Dummy
s into Datum::Dummy
.
Useful for removing an expensive aggregation while maintaining the shape of a reduce operator.
Implementations
pub fn eval<'a, I>(&self, datums: I, temp_storage: &'a RowArena) -> Datum<'a> where
I: IntoIterator<Item = Datum<'a>>,
Returns the output of the aggregation function when applied on an empty input relation.
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.
Returns true if the non-null constraint on the aggregation can be converted into a non-null constraint on its parameter expression, ie. whether the result of the aggregation is null if all the input values are null.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Adds names and types of the fields of the struct or enum to rti
. 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
impl RefUnwindSafe for AggregateFunc
impl Send for AggregateFunc
impl Sync for AggregateFunc
impl Unpin for AggregateFunc
impl UnwindSafe for AggregateFunc
Blanket Implementations
Mutably borrows from an owned value. Read more
Formats an object with the “alternative” format ({:#}
) and returns it.
Compare self to key
and return true
if they are equal.
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