Re: Regarding state access in UDF

2021-06-30 Thread Kai Fu
Hi Ingo, Thank you for your advice, we've not tried it yet, we just thought it may work that way, but now it seems not then. We'll see how it could match our use case with the AggregateFunction interface. On Thu, Jul 1, 2021 at 1:57 PM Ingo Bürk wrote: > Hi Kai, > > CheckpointedFunction is not

Re: Regarding state access in UDF

2021-06-30 Thread Ingo Bürk
Hi Kai, CheckpointedFunction is not an interface meant to be used with UDFs (in the Table API / SQL sense[1]), but is rather an interface for DataStream API[2]; the term "user-defined function" has a different meaning there. Did you actually try it to see if it works? I'd be surprised it it did.

Re: Regarding state access in UDF

2021-06-30 Thread Kai Fu
Hi Ingo, Thank you for the reply, we actually need more fine-grained control on the states in UDF. Per investigation, we found that the states can be simply created/accessed via implementing `CheckpointedFunction` interface, please advise if there is any side-effect by doing that. On Wed, Jun 30,

Re: Regarding state access in UDF

2021-06-30 Thread Ingo Bürk
Hi Kai, AggregateFunction and TableAggregateFunction are both stateful UDF interfaces. This should cover most scenarios given where they would be used. If you need more fine-grained control you can also always drop down into the DataStream API (using #toDataStream) and work there. Table API / SQL

Regarding state access in UDF

2021-06-30 Thread Kai Fu
Hi team, We've a use case that needs to create/access state in UDF, while per the documentation and UDF interface