If you call a HASHBUCKET function with an argument of NULL, the function returns NULL. SELECT HASHBUCKET(NULL);