Skip to main content

Module compare

Module compare 

Source
Expand description

Byte-level comparison and hashing for MessagePack field values.

Operates on raw byte ranges returned by extract_field. Used for join key matching, GROUP BY key deduplication, ORDER BY, and DISTINCT.

Functions§

compare_field_bytes
Compare two MessagePack values by their decoded content.
compare_field_i64
Compare two numeric MessagePack values as i64. Useful when the caller knows both values are integers.
field_bytes_eq
Check if two MessagePack values are byte-identical. For canonical-encoded documents, byte equality implies semantic equality.
hash_field_bytes
Hash the raw bytes of a MessagePack value at range within buf. Uses a fast non-cryptographic hash suitable for hash joins and GROUP BY.
hash_field_bytes_with
Hash the raw bytes using a provided RandomState for consistent hashing within a single query (all docs hashed with the same seed).
is_field_null
Check if a field value is null without extracting it.