Hi Guobao, Looks like this is from table/SQL API. You can override public void open(FunctionContext context) It should work, can you provide more information? Like: - version - which planner - what problem, open method never being invoked?
Best, Jingsong Lee On Wed, Dec 4, 2019 at 11:09 AM Biao Liu <mmyy1...@gmail.com> wrote: > Hi Guobao, > > Are you using table API? I'm not familiar with table API, but for data > stream API, generally speaking user could do some initialization through > "open" method of "Rich" function, like "RichAggregateFunction". > > Thanks, > Biao /'bɪ.aʊ/ > > > > On Tue, 3 Dec 2019 at 22:44, Guobao Li <gu...@criteo.com> wrote: > >> Hi community, >> >> >> >> 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 invoked by AggregateFunction. Could >> anyone help me out of it? >> >> >> >> Thanks, >> >> Guobao >> >> >> > -- Best, Jingsong Lee