Skip to main content

UpdateFn

Type Alias UpdateFn 

Source
pub type UpdateFn = unsafe extern "C" fn(info: duckdb_function_info, input: duckdb_data_chunk, states: *mut duckdb_aggregate_state);
Expand description

Accumulates data from a chunk into the aggregate states.

states is a pointer to an array of state pointers — one per input row (rows of the same group carry the same pointer), so states[row] is the state for row row of input.

The chunk holds every input row, NULL rows included, whatever NullHandling the aggregate was registered with: check VectorReader::is_valid before reading a value.