hyper-api-samples icon indicating copy to clipboard operation
hyper-api-samples copied to clipboard

REQUEST : add a HASH32 and HASH64 functions

Open rferraton opened this issue 3 years ago • 1 comments

In order to improve join performance , would it be possible to have a scalar functions that return a int(HASH32) or bigint (HASH64) resulting from a hash algorithme from a string input.

The idea is to allow to create column in table and compute them using the functions.

Like UPDATE PRODUCT SET PROD_JoinKey = XXHASH3(CODSOC || '+' || CODPRODUCT) WHERE PROD_JoinKey <> XXHASH3(CODSOC || '+' || CODPRODUCT)

Or

UPDATE PRODUCT SET PROD_JoinKey = HASH64(CODSOC || '+' || CODPRODUCT, 'XXHASH3') WHERE PROD_JoinKey <> HASH64((CODSOC || '+' || CODPRODUCT,'XXHASH3')

The objective is to hash fast, not a crypto usage, limit collision of course, with a standard and open algorithme (because the data can came from outside already hashed or not)

I take XXHASH as exemple but there is many others algo : a real zoo :-)

rferraton avatar May 17 '22 09:05 rferraton

Hi @rferraton,

thanks a lot for reporting. We take this as a feature request and will add it to our backlog. Note that we cannot guarantee when we get to working on it.

Cheers Jonas

jonas-eckhardt avatar May 31 '22 07:05 jonas-eckhardt