flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Hueske <fhue...@gmail.com>
Subject Re: Getting runtime context from scalar and table functions
Date Wed, 04 Apr 2018 19:51:38 GMT
Hi Darshan,

Accumulators are not exposed to UDFs of the Table API / SQL.
What's your use case for these? Would metrics do the job as well?

Best, Fabian

2018-04-04 21:31 GMT+02:00 Darshan Singh <darshan.meel@gmail.com>:

> Hi,
>
> I would like to use accumulators with table /scalar functions. However, I
> am not able to figure out how to get the runtime context from inside of
> scalar function open method.
> Only thing i see is function context which can not provide the runtime
> context.
>
> I tried using AbstractRichFunction.getRuntimeContext()
> <https://ci.apache.org/projects/flink/flink-docs-release-1.3/api/java/org/apache/flink/api/common/functions/AbstractRichFunction.html#getRuntimeContext-->
> .  which I guess is not allowed from open of scalar or table functions.
>
> Any help will be appreciated.
>
> Thanks
>

Mime
View raw message