You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Volnei (Jira)" <ji...@apache.org> on 2020/06/12 14:12:00 UTC

[jira] [Created] (IMPALA-9852) UDA Check that function name, arguments, and return type are correct.

Volnei created IMPALA-9852:
------------------------------

             Summary: UDA Check that function name, arguments, and return type are correct. 
                 Key: IMPALA-9852
                 URL: https://issues.apache.org/jira/browse/IMPALA-9852
             Project: IMPALA
          Issue Type: Question
          Components: Backend
    Affects Versions: Impala 2.10.0
            Reporter: Volnei


Hi,

I'm trying to register a UDA in the database, but the error below always happens:
{code:java}
create aggregate function avgtest(double) returns double
location '/user/cloudera/impala_udf/aggreg.so'
init_fn='Avg_Init'
update_fn='Avg_Update'
merge_fn='Avg_Merge'
finalize_fn='Avg_Finalize';

AnalysisException: Could not find function Avg_Update(DOUBLE) returns DOUBLE in: hdfs://quickstart.cloudera:8020/user/cloudera/impala_udf/aggreg.so Check that function name, arguments, and return type are correct
{code}
If I create a UDA without using BufferVal as one of the arguments, the error doesnt ' happen.

The UDA in question is the one available in impala-master/be/src/udf_samples /

 {code:java}
void Avg_Init(FunctionContext* context, BufferVal* val);
void Avg_Update(FunctionContext* context, *const DoubleVal*& input, BufferVal* val);
void Avg_Merge(FunctionContext* context, const BufferVal& src, BufferVal* dst);
*DoubleVal* Avg_Finalize(FunctionContext* context, const BufferVal& val);
{code}


Could anybody give me any suggestions on this problem?

Thank you.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org