Can the minhash function accept a different hashin...
# general
k
Can the minhash function accept a different hashing algorithm for the minhashing?
j
What hashing algorithm are you thinking of?
k
The deduplication results are currently vastly different so it makes it a bit difficult to switch over
j
We currently use mumurhash cc @Sammy Sidhu
Yeah shouldn’t be too difficult to make configurable on our end I think
s
What hash functions would you like to see implemented?
k
Just this sha1 first 4 bytes
j
sha1 is kind of wasteful 😛 so much compute just to take the 32 bits
k
Yeah..
j
you’ll likely see some performance degradation I’m guessing
Also are you doing normalization the same way as you were before? That might affect results
k
I'm wondering if murmurhash's first four bytes will give equivalent results
Normalization is mostly similar except tokenization which is slightly different because it splits on non-alpha regex instead of on whitespace
s
We also do have
xxhash3_64
already implemented, we could take the lower 32 bits of that to use for minhash. Should be straight forward to add an option for that as well. It will also be much faster than
murmur
Take a look at some benchmarks: https://github.com/Cyan4973/xxHash?tab=readme-ov-file#benchmarks
for context, this is the hash function we use for all internal Daft partitioning and it seems to work well
k
Cool! I think because of the truncation to 4 bytes the collision rate is much higher and hence the pyspark implementation is identifying a lot more duplicates
So the truncation to 4 bytes i think is important