[
https://issues.apache.org/jira/browse/IMPALA-9852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17134788#comment-17134788
]
Volnei commented on IMPALA-9852:
--------------------------------
You're really right, if I use extern "C" {} the problem is solved. I hadn't
taken this situation before.
But it is not necessary to use this technique in all cases, right?
> 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
> Priority: Major
>
> 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: [email protected]
For additional commands, e-mail: [email protected]