Module first_last

Module first_last 

Source
Expand description

Defines the FIRST_VALUE/LAST_VALUE aggregations.

Structs§

FirstValue
FirstValueAccumulator
LastValue
TrivialFirstValueAccumulator
This accumulator is used when there is no ordering specified for the FIRST_VALUE aggregation. It simply returns the first value it sees according to the pre-existing ordering of the input data, and provides a fast path for this case without needing to maintain any ordering state.
TrivialLastValueAccumulator
This accumulator is used when there is no ordering specified for the LAST_VALUE aggregation. It simply updates the last value it sees according to the pre-existing ordering of the input data, and provides a fast path for this case without needing to maintain any ordering state.

Functions§

first_value
Returns the first value in a group of values.
first_value_udaf
AggregateFunction that returns a AggregateUDF for FirstValue
last_value
Returns the last value in a group of values.
last_value_udaf
AggregateFunction that returns a AggregateUDF for LastValue