AggregationExpression

sealed interface AggregationExpression

One numeric contribution per current root or expanded record, for data conforming to its numeric schema. FIELD selects the sole non-null numeric value; missing, empty and multi-valued fields do not contribute. Repeated numeric values remain separate values. BINARY computes finite doubles; it does not pair arrays or preserve arbitrary native numeric precision.

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
data class Constant(val value: Double) : AggregationExpression
Link copied to clipboard
data class DateDiff(val from: QueryField, val to: QueryField, val unit: DateDiffUnit) : AggregationExpression

The elapsed time from the instant in from to the instant in to, to − from, in unit as a decimal: negative when to is earlier, and no contribution when either instant is absent. Both fields must be single-valued temporal fields; each is read in its own temporal encoding.

Link copied to clipboard
data class Field(val field: QueryField) : AggregationExpression

Properties

Link copied to clipboard

The fields an expression reads, in tree order.