Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQUEST : add a HASH32 and HASH64 functions #59

Open
rferraton opened this issue May 17, 2022 · 1 comment
Open

REQUEST : add a HASH32 and HASH64 functions #59

rferraton opened this issue May 17, 2022 · 1 comment

Comments

@rferraton
Copy link

rferraton commented May 17, 2022

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 :-)

@jonas-eckhardt
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants