Created on 12-01-2021 07:33 AM - last edited on 12-01-2021 08:24 AM by VidyaSargur
Below UDF works fine with Hive, but with Impala we are not able create function,
it give following error:
SQL Error [500051] [HY000]: [Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:CatalogException: No compatible function signatures found
public class SumCols extends UDF {
public double evaluate(Text... string) {
double d = 0.0;
for (Text s : string) {
String str = s.toString();
if (str != null)
d += Double.parseDouble(str.toString());
}
return d;
}
}
I believe it is because of Variable length of arguments Text...
I am looking for its alternate solution in Impala.
Created 12-06-2021 06:15 AM
Hi @HareshAmin ,
As per the below documentation it looks like Hive UDF's are not supported in Impala.
Please refer the documentation:
https://docs.cloudera.com/documentation/enterprise/5-8-x/topics/impala_udf.html
Regards,
Chethan YM
Created 12-08-2021 09:29 PM
@HareshAmin Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.
Regards,
Vidya Sargur,