gizmodel/sql/aggnames
which function names are aggregates, the one owner of that list. The parser and the binder read it here; the states and kernels of each aggregate stay in aggregate.giz, whose lookup refuses a name this list lacks, so an aggregate added there and not here fails its own tests at once.
import * as Aggnames from "gizmodel/sql/aggnames";Functions
isPgmlAggregate
function isPgmlAggregate(name: string): boolWhether pgml.NAME is an aggregate: the sum, min, max, min_abs or max_abs of each element.
rankAggregate
function rankAggregate(name: string): boolWhether NAME is an ordered-set aggregate of rank: median, percentile_cont or percentile_disc.
stringCollection
function stringCollection(name: string): boolWhether NAME joins strings: group_concat, string_agg or listagg.
aggregatePairSupported
function aggregatePairSupported(name: string): boolWhether NAME is an aggregate of key and value pairs into a JSON object.
isRewrittenAggregate
function isRewrittenAggregate(name: string): boolStarRocks' and MySQL's aggregates that the binder writes as others of the same answer (Binder.aggregate).
comoment
function comoment(name: string): boolWhether NAME is an aggregate of two variables: covariance, correlation or regression.
Effects: fail, alloc.
varianceAggregate
function varianceAggregate(name: string): boolWhether NAME is a variance or standard deviation aggregate.
linearModel
function linearModel(name: string): boolBoth public model results read the same centered square-root state.
isAggregate
function isAggregate(name: string): boolWhether name is an aggregate: its state lives in aggregate.giz lookupAggregate, or the binder rewrites it.
Effects: fail, alloc.
isAggregateCall
function isAggregateCall(name: string, arity: i64): boolWhether a call of name with arity arguments is an aggregate: min and max with other than one
argument are the scalar functions. The one rule that binding and inlining share.
Effects: fail, alloc.
Constants
EXACT_SUM
const EXACT_SUM = "\u0001exact_sum"sum(x) whose exact total may pass the decimal limits: a part of an exact variance (bind.giz momentAggs), which PostgreSQL computes from totals it keeps whole.