aggDtypeOf

fnDataType aggDtypeOf(AggKind agg, DataType d) @safe pure nothrow

The promoted sum dtype of one kind, mirroring the one-slot sum kernel of ddn.df.compute: narrow integers widen to INT64, BOOLEAN sums into UINT32, everything else keeps its own kind.

Parameters

Kthe aggregated kind

Returns

the result dtype of the sum.

The output dtype of one aggregation kind over a column dtype — the rule every aggColumn/aggStat finish and the plan schema derivation share: the sum and product take the promoted sum dtype (the narrow integers widen, BOOLEAN sums to UINT32), the count is UINT32, the mean FLOAT64 (FLOAT32 for FLOAT32 columns), the quantiles and dispersion statistics FLOAT64, the dtype-preserving kinds keep the column dtype, and collect produces LIST of the column dtype.

Params: agg = the aggregation kind d = the aggregated column's dtype

Returns: the aggregation's output dtype.