Skip to main content

fingerprint_predicate

Function fingerprint_predicate 

Source
pub fn fingerprint_predicate(table_name: &str, expr: &Expression) -> u64
Expand description

Compute a fingerprint for a predicate expression

The fingerprint captures the structure of the predicate but not the literal values. This allows the same correction factor to be applied to:

  • status = 'active' and status = 'pending' (same structure)

Different structures produce different fingerprints:

  • status = 'active' vs status = 'active' AND age > 30

Uses FxHasher which is 2-5x faster than SipHash for small keys.