hash_agg

Description

Returns an aggregate signed 64-bit hash value over the (unordered) set of input rows.

hash_agg() is not a cryptographic hash function and should not be used as such. hash_agg() accepts 1 or more input columns. hash_agg() never returns null, even if no input rows are provided. Empty input “hashes” to 0. Null is treated as a regular value, not an absent value.

Return type

int64

Domain

This is an aggregate function (aggregates rows over a group in aggregate verbs.)

This is a window function (calculates over a group of multiple input rows using windowing.)

Categories

Usage

hash_agg(expr_1, expr_2, ...)

Argument

Type

Optional

Repeatable

Restrictions

expr

storable

no

yes

none

Examples

statsby oa:hash_agg(jobid, status)

Return a single int64 hash of all values in the jobid and status columns.

statsby oa:hash_agg(jobid), group_by(status)

Return an int64 hash of all values of jobid, grouped by status.