IMPALA function 'hive generic UDF SHA2 '
Hi all,
I'm trying to create a function to use in imapla.
my function is simply re-using hive's sha2() function.
the creation of the function goes smoothly
:
create function to_sha2(string,int) returns string location 'user/hive/hive.jar' symbol='org.apache.hadoop.hive.ql.udf.generic.GenericUDFSha2' ;
but when I try to use it doesn't work launching this warning :
select to_sha2('test',256);
Query State: EXCEPTION
Query Status: ClassCastException: class org.apache.hadoop.hive.ql.udf.generic.GenericUDFSha2
I have tried to search for UDFSha2 that doesn't contain the Generic word in the hive's jar but I couldn't find it.
the original built-in function in hive :
sha2(string/binary, len) - Calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). |
the other functions are working normally in impala (for example I have tried to create UDF MD5 function from hive's jar and it was working ).
so my question is do I have to create my own UDF-Sha2 function?
or there is a saving situation for my case, any help will be appreciated
Impala version 2.9
Hive : 1.1.0
CDH : 5.12

