You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "LI Guobao (Jira)" <ji...@apache.org> on 2019/12/04 15:37:00 UTC

[jira] [Comment Edited] (FLINK-15040) Open function is not called in UDF AggregateFunction

    [ https://issues.apache.org/jira/browse/FLINK-15040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16987694#comment-16987694 ] 

LI Guobao edited comment on FLINK-15040 at 12/4/19 3:36 PM:
------------------------------------------------------------

Hi [~jark], thanks for the quick response. In fact, I am using a branch which forked the version 1.6. I implemented an AggregateFunction UDF which is used in Flink SQL. The idea is to do groupBy with this UDF and add a metric inside the UDF to track the size of aggregated array. I have override the open method and it seemed it was not called. And another question: why the custom metrics work on ScalarFunction but not AggregateFunction?


was (Author: guobao):
Hi [~jark], thanks for the quick response. In fact, I am using a branch which forked the version 1.6. I implemented an AggregateFunction UDF which is used in Flink SQL. The idea is to do groupBy with this UDF and add a metric inside the UDF to track the size of aggregated array. I have override the open method and it seemed it was not called.

> Open function is not called in UDF AggregateFunction
> ----------------------------------------------------
>
>                 Key: FLINK-15040
>                 URL: https://issues.apache.org/jira/browse/FLINK-15040
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: LI Guobao
>            Priority: Major
>
> I am trying to register a metric in an aggregate UDF by overriding the *open* function. According to the documentation, the *open* function can be override in order to retrieve the metric group to do the metric registration. But it works only on ScalarFunction not on AggregateFunction. Since the *open* function is not call by AggregateFunction.



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