Does anyone have the source code of the below SQL function hash/hash64
Need to make sure there is no Uniqueness/Collision after hashing value.
Try to find in the dremio-oss GitHub project, but no luck so far
There is this part
@Override
public void eval() {
out.isSet = 1;
if (in.isSet == 0) {
out.value = 0;
} else {
out.value = com.dremio.common.expression.fn.impl.HashHelper.hash64(in.value, 0);
}
}
Which call
com.dremio.common.expression.fn.impl.HashHelper.hash64
Which I think is the main logic of the function. But I can’t find it anywhere in the code?
There is no main logic in the
Nvm I found it
It uses the MurmurHash3, which logic stores in this file
I think hash64 is safe for collision at < 1 billion items