0

how can we get same hash values in oracle db as same as impala. I have migrated tables and code from impala to oracle. Some of the queries are using hash values with FNV_HASH function in impala, Now we have to use the same has values in oracle as well. I have used below functions but getting different values other then fnv_hash() values.

select ora_hash(col1) from tab1;
o/p Like (32 bit crypto) : 383995946

select standard_hash(col1) from tab1;
o/p Like : 1C573524423F604D0A784304DF9D3987C9FF8491

 but fnv_hash () has different values in impala.
select fnv_hash(col1) from tab1;
o/p like (64 bit crypto) : 560601135861444766 

Could you please help me that how to get 64 bit cyypto values in oracle as same as impala.

Ganesh galla
  • 15
  • 1
  • 4

1 Answers1

0

fnv_hash implements a non-cryptographic Fowler–Noll–Vo hash function. Oracle's ORA_HASH is a proprietary non-cryptographic hash algorithm, and STANDARD_HASH implements a number of standard cryptographic hashes like SHA1, SHA256, SHA384, SHA512, and MD5. They're not ever going to produce the same output because they're not performing the same calculations.

It does not appear that Oracle has a 64-bit equivalent to fnv_hash.

pmdba
  • 6,457
  • 2
  • 6
  • 16