pub struct AggregateFunction {
pub source_dialect: Option<DialectType>,
pub name: String,
pub args: Vec<Expression>,
pub distinct: bool,
pub filter: Option<Expression>,
pub order_by: Vec<Ordered>,
pub limit: Option<Box<Expression>>,
pub ignore_nulls: Option<bool>,
pub inferred_type: Option<DataType>,
}Expand description
Represent a named aggregate function call with optional FILTER, ORDER BY, and LIMIT.
This struct is used for aggregate function calls that are not covered by
one of the dedicated typed variants (e.g. Count, Sum). It supports
SQL:2003 FILTER (WHERE …) clauses, ordered-set aggregates, and
IGNORE NULLS / RESPECT NULLS modifiers.
Fields§
§source_dialect: Option<DialectType>Dialect whose call semantics must be retained through independent generation.
name: StringThe aggregate function name (e.g. “JSON_AGG”, “XMLAGG”).
args: Vec<Expression>Positional arguments.
distinct: boolWhether DISTINCT was specified.
filter: Option<Expression>Optional FILTER (WHERE …) clause applied to the aggregate.
order_by: Vec<Ordered>ORDER BY inside aggregate (e.g., JSON_AGG(x ORDER BY y))
limit: Option<Box<Expression>>LIMIT inside aggregate (e.g., ARRAY_CONCAT_AGG(x LIMIT 2))
ignore_nulls: Option<bool>IGNORE NULLS / RESPECT NULLS
inferred_type: Option<DataType>Inferred data type from type annotation