MINHASH_COMBINE

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functionsWindow functions

Combines input MinHash states into a single MinHash output state. This Minhash state can then be input to the APPROXIMATE_SIMILARITY function to estimate the similarity with other MinHash states. This allows use cases in which MINHASH is run over horizontal rowsets of the same table, producing a MinHash state for each rowset. These states can then be combined using MINHASH_COMBINE, producing the same output state as a single run of MINHASH over the entire table. For more information about MinHash states, see Estimating Similarity of Two or More Sets.

Syntax

supportedpartialnot supportednot scored

Aggregate function

MINHASH_COMBINE( [ DISTINCT ] <state> )

Window function

MINHASH_COMBINE( [ DISTINCT ] <state> ) OVER ( [ PARTITION BY <expr> ] )

Parameters

NameRequiredDescription
staterequiredAn expression that contains MinHash state information generated by a call to MINHASH. Input MinHash states must have arrays of equal length.

Usage notes

See also

Referenced by