Boolean Aggregate Functions
4 functions for boolean aggregation. Unlike the other categories, these operate across a group of rows (used within an Aggregate node) rather than transforming a single row's column value.
Requires Spark 3.0 or later.
| Function | Syntax | Parameters | Notes |
|---|---|---|---|
every | every(column) | None. | True if all rows in the group are true. |
some | some(column) | None. | True if any row in the group is true. |
count_if | count_if(column) | None. | Counts rows in the group where the condition column is true. |
any_value | any_value(column) | None. | Returns an arbitrary (non-deterministic) value from the group. |