Re: Apache Beam SQL and UDF

2021-02-10 Thread Talat Uyarer
Thanks Rui to remind me lifecycle of UDF. LOoks liek there is no any lifecycle. I checked the code looks like we create UDF's instance for each message: org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.runtime.SqlFunctions.isTrue(new > com.paloaltonetworks.cortex.streamcompute.functions.M

Re: Apache Beam SQL and UDF

2021-02-10 Thread Talat Uyarer
Does beam create UDF function for every bundle or in setup of pipeline ? I will keep internal state in memory. The Async thread will update that in memory state based on an interval such as every hour etc. If beam keeps UDF instance more than one bundle it is ok for me. On Wed, Feb 10, 2021, 12:

Re: Apache Beam SQL and UDF

2021-02-10 Thread Rui Wang
The problem that I can think of is maybe before the async call is completed, the UDF life cycle has reached to the end. -Rui On Wed, Feb 10, 2021 at 12:34 PM Talat Uyarer wrote: > Hi, > > We plan to use UDF on our sql. We want to achieve some kind of > filtering based on internal states. We wa

Apache Beam SQL and UDF

2021-02-10 Thread Talat Uyarer
Hi, We plan to use UDF on our sql. We want to achieve some kind of filtering based on internal states. We want to update that internal state with a separate async thread in UDF. Before implementing that thing I want to get your options. Is there any limitation for UDF to have multi-thread implemen