Summary
User-Defined Aggregate Functions (UDAF) are now in preview on BigQuery. The introduction of UDAF was announced last month but was cancelled by Google, presumably because they were not ready. UDAF allows the creation of an aggregate function using an expression that contains SQL code. It accepts columns to be aggregated and those not to be, returning the result of the calculation as a single value.