Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Oct 25, 2024
1 parent b2a6bc1 commit d5769f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion daft/expressions/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ def minhash(
num_hashes: The number of hash permutations to compute.
ngram_size: The number of tokens in each shingle/ngram.
seed (optional): Seed used for generating permutations and the initial string hashes. Defaults to 1.
hash_function (optional): Hash function to use for initial string hashing. One of "murmur3", "xxhash", or "sha1". Defaults to "murmur3".
hash_function (optional): Hash function to use for initial string hashing. One of "murmurhash3", "xxhash", or "sha1". Defaults to "murmurhash3".
"""
assert isinstance(num_hashes, int)
Expand Down
2 changes: 1 addition & 1 deletion src/daft-sql/src/modules/hashing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl TryFrom<SQLFunctionArguments> for MinHashFunction {
})
})
.transpose()?
.unwrap_or("murmur3");
.unwrap_or("murmur3hash3");

Ok(Self {
num_hashes,
Expand Down
2 changes: 1 addition & 1 deletion tests/series/test_minhash.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def minhash_none(
@pytest.mark.parametrize("num_hashes", [1, 2, 16, 128])
@pytest.mark.parametrize("ngram_size", [1, 2, 4, 5, 100])
@pytest.mark.parametrize("seed", [1, -1, 123, None])
@pytest.mark.parametrize("hash_function", ["murmur3", "xxhash", "sha1"])
@pytest.mark.parametrize("hash_function", ["murmurhash3", "xxhash", "sha1"])
def test_minhash(num_hashes, ngram_size, seed, hash_function):
minhash = minhash_none(test_series, num_hashes, ngram_size, seed, hash_function)
assert minhash[4] is None and minhash[-1] is None
Expand Down

0 comments on commit d5769f7

Please sign in to comment.