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.