Hamming functions in the RapidFuzz DuckDB extension
Function category
Hamming
4 functionsPosition-by-position character match count. Only meaningful when both strings have the same length.
Signature
rapidfuzz_hamming_distance(col0: VARCHAR, col1: VARCHAR) → DOUBLE
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
col0
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
col1
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Number of differing positions between two equal-length strings. Raw count of edits required.
Related functions
- rapidfuzz_hamming_similarity() — Number of differing positions between two equal-length strings
- rapidfuzz_hamming_normalized_distance() — Number of differing positions between two equal-length strings
- rapidfuzz_hamming_normalized_similarity() — Number of differing positions between two equal-length strings
Signature
rapidfuzz_hamming_normalized_distance(col0: VARCHAR, col1: VARCHAR) → DOUBLE
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
col0
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
col1
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Number of differing positions between two equal-length strings. Edit distance scaled to [0, 1] — 0 means identical.
Related functions
Signature
rapidfuzz_hamming_normalized_similarity(col0: VARCHAR, col1: VARCHAR) → DOUBLE
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
col0
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
col1
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Number of differing positions between two equal-length strings. Similarity scaled to [0, 1] — 1 means identical.
Related functions
Signature
rapidfuzz_hamming_similarity(col0: VARCHAR, col1: VARCHAR) → DOUBLE
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
col0
|
Type
VARCHAR
|
Mode Positional | Description |
Argument
col1
|
Type
VARCHAR
|
Mode Positional | Description |
Description
Number of differing positions between two equal-length strings. Raw count of matches.
Related functions
- rapidfuzz_hamming_distance() — Number of differing positions between two equal-length strings
- rapidfuzz_hamming_normalized_distance() — Number of differing positions between two equal-length strings
- rapidfuzz_hamming_normalized_similarity() — Number of differing positions between two equal-length strings