Uses of Class
dev.frostlake.functions.AggregateFunction
Packages that use AggregateFunction
-
Uses of AggregateFunction in dev.frostlake.functions
Methods in dev.frostlake.functions that return AggregateFunctionMethods in dev.frostlake.functions that return types with arguments of type AggregateFunctionMethods in dev.frostlake.functions with parameters of type AggregateFunctionModifier and TypeMethodDescriptionvoidFunctionRegistry.registerAggregate(AggregateFunction function) -
Uses of AggregateFunction in dev.frostlake.functions.aggregate
Subclasses of AggregateFunction in dev.frostlake.functions.aggregateModifier and TypeClassDescriptionclassANY_VALUE(expr) — an arbitrary non-NULL value from the group (this implementation keeps the first one it sees), or NULL when the group holds none.classAPPROX_COUNT_DISTINCT(expr) — an approximate count of the distinct non-NULL values in the group, estimated with theHllAccumulatorHyperLogLog sketch (~0.8% standard error, near-exact at low cardinality).classAPPROX_PERCENTILE(expr, percentile) — the approximate value at the given percentile (a constant in [0, 1]) ofexpr.classAPPROX_PERCENTILE_ACCUMULATE(expr): thePercentileDigestof a numeric input as an OBJECT state, for APPROX_PERCENTILE_COMBINE to merge and APPROX_PERCENTILE_ESTIMATE to read.classAPPROX_PERCENTILE_COMBINE(state): the APPROX_PERCENTILE_ACCUMULATE states of its input merged into one digest — every centroid kept with its weight, sorted by mean.classAPPROX_TOP_K(expr [, k [, counters]]): the k most frequent values of the input as an ARRAY of [value, count] pairs, count descending, computed by the Space-Saving summary inTopKSummaryovercounterscounters (default 100000; k defaults to 1).classAPPROX_TOP_K_ACCUMULATE(expr, counters): the wholeTopKSummaryof the input as an OBJECT state —{"counters":C,"datatype":T,"precision":P,"scale":S,"state":[[value, count], …], "type":"approx_top_k"}— for APPROX_TOP_K_COMBINE to merge and APPROX_TOP_K_ESTIMATE to rank.classAPPROX_TOP_K_COMBINE(state [, counters]): the APPROX_TOP_K_ACCUMULATE states of its input merged into one — equal values add their counts, nothing is inherited — and trimmed tocounters(a constant between 1 and 100000; by default the inputs' own limit, which every input must share: differing limits refuse withInvalid parameter value: ApproxTopK state. Reason: combining states with different numbers of counters).classclassARRAY_UNION_AGG(array) — an aggregate whose every input row is itself an ARRAY.classARRAY_UNIQUE_AGG(expr) — an aggregate that collects the DISTINCT non-NULL scalar input values (each input row contributes a single element, not an array) into a VARIANT ARRAY.classAVG(expr) — seeAvgAccumulator/AggregateNumerics.avg(Iterable)for the live-verified Snowflake result typing (fixed-point inputs → BigDecimal scale = max input scale + 6, HALF_UP; any double/VARIANT input → double; empty → NULL).classclassclassclassclassThe three boolean aggregates' shared argument rule.classclassclassclassclassclassclassclassHASH_AGG(expr) — a single, order-INDEPENDENT signed 64-bit hash over the whole (multi)set of input rows.classclassLISTAGG(<expr> [, <delimiter>]) — concatenate values into a single string.classclassMAX_BY(value, sort_key) — a two-argument aggregate returning thevaluefrom the row whosesort_keyis the maximum.classclassclassMIN_BY(value, sort_key) — a two-argument aggregate returning thevaluefrom the row whosesort_keyis the minimum.classclassOBJECT_AGG(key, value) — aggregates key/value pairs into a single OBJECT.classclassclassREGR_AVGX(y, x) — average of the independent variable x over non-null (y, x) pairs (y dependent, x independent).classREGR_AVGY(y, x) — average of the dependent variable y over non-null (y, x) pairs (y dependent, x independent).classREGR_COUNT(y, x) — count over non-null (y, x) pairs (y dependent, x independent).classREGR_INTERCEPT(y, x) — y-intercept of the least-squares regression line over non-null (y, x) pairs (y dependent, x independent).classREGR_R2(y, x) — coefficient of determination (R squared) over non-null (y, x) pairs (y dependent, x independent).classREGR_SLOPE(y, x) — slope of the least-squares regression line over non-null (y, x) pairs (y dependent, x independent).classREGR_SXX(y, x) — sum of squares of x deviations over non-null (y, x) pairs (y dependent, x independent).classREGR_SXY(y, x) — sum of products of x and y deviations over non-null (y, x) pairs (y dependent, x independent).classREGR_SYY(y, x) — sum of squares of y deviations over non-null (y, x) pairs (y dependent, x independent).classclassclassclassclassclassclassclassclassVECTOR_AVG(v)— the element-wise MEAN of a group's vectors, always aVECTOR(FLOAT, n): over the rows[1,2,3]and[4,5,6]it is[2.5,3.5,4.5](live-verified).classVECTOR_MAX(v)— the element-wise MAXIMUM of a group's vectors, keeping the element type: over the rows[1,9,3],[4,5,-6]and[7,2,0]it is[7.0,9.0,3.0](live-verified), i.e. each dimension is maximised on its own.classVECTOR_MIN(v)— the element-wise MINIMUM of a group's vectors, keeping the element type: over the rows[1,9,3],[4,5,-6]and[7,2,0]it is[1.0,2.0,-6.0](live-verified), i.e. each dimension is minimised on its own.classVECTOR_SUM(v)— the element-wise SUM of a group's vectors, keeping the element type: over the rows[1,2,3]and[4,5,6]it is[5.0,7.0,9.0](live-verified).