GizStack
View .mdOpen in ChatGPTOpen in Claude

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.

gizlang
import * as Aggnames from "gizmodel/sql/aggnames";

Functions

isPgmlAggregate

gizlang
function isPgmlAggregate(name: string): bool

Whether pgml.NAME is an aggregate: the sum, min, max, min_abs or max_abs of each element.

rankAggregate

gizlang
function rankAggregate(name: string): bool

Whether NAME is an ordered-set aggregate of rank: median, percentile_cont or percentile_disc.

stringCollection

gizlang
function stringCollection(name: string): bool

Whether NAME joins strings: group_concat, string_agg or listagg.

aggregatePairSupported

gizlang
function aggregatePairSupported(name: string): bool

Whether NAME is an aggregate of key and value pairs into a JSON object.

isRewrittenAggregate

gizlang
function isRewrittenAggregate(name: string): bool

StarRocks' and MySQL's aggregates that the binder writes as others of the same answer (Binder.aggregate).

comoment

gizlang
function comoment(name: string): bool

Whether NAME is an aggregate of two variables: covariance, correlation or regression.

Effects: fail, alloc.

varianceAggregate

gizlang
function varianceAggregate(name: string): bool

Whether NAME is a variance or standard deviation aggregate.

linearModel

gizlang
function linearModel(name: string): bool

Both public model results read the same centered square-root state.

isAggregate

gizlang
function isAggregate(name: string): bool

Whether name is an aggregate: its state lives in aggregate.giz lookupAggregate, or the binder rewrites it.

Effects: fail, alloc.

isAggregateCall

gizlang
function isAggregateCall(name: string, arity: i64): bool

Whether 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

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