BITMAP_HASH64 Function
Overview
The BITMAP_HASH64 function hashes an input string using 64-bit hashing and returns a bitmap containing the hash value. This function is the 64-bit variant of BITMAP_HASH, using the MurmurHash3 64-bit algorithm to compute hash values. It produces a larger range of hash values, thereby reducing the probability of hash collisions.
Syntax
bitmap_hash64(expr)
Parameters
expr: An expression of typeSTRING, the input string for which to compute a 64-bit hash value.
Return Result
Returns BITMAP type containing a 64-bit integer hash value.
Examples
-
Compute a 64-bit hash for a string:
-
Compute a 64-bit hash for another string:
-
When the input is NULL:
Notes
- When the input parameter is NULL, the result is NULL.
BITMAP_HASH64uses the MurmurHash3 64-bit algorithm, whileBITMAP_HASHuses the MurmurHash3 32-bit algorithm. The 64-bit hash produces a larger value range with a lower probability of hash collisions, making it suitable for large-scale data scenarios.- The returned bitmap contains a single 64-bit unsigned integer hash value, which can be used directly for subsequent bitmap operations (such as
BITMAP_OR,BITMAP_AND, etc.).
