Hi Seth,

You're right, but you still have to roll your own type inference for all
supported types you want, which isn't terrible but not ideal.

On Sun, Sep 19, 2021, 18:06 Seth Wiesman <sjwies...@gmail.com> wrote:

> Hi,
>
> I agree it would be great to see these functions built-in, but you do not
> need to write a UDF for each type. You can overload a UDFs type inference
> and have the same capabilities as built-in functions, which means
> supporting generics.
>
>
> https://github.com/apache/flink/blob/master/flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/functions/LastDatedValueFunction.java
>
> On Sat, Sep 18, 2021 at 7:42 AM Yuval Itzchakov <yuva...@gmail.com> wrote:
>
>> Hi Jing,
>>
>> I recall there is already an open ticket for built-in aggregate functions
>>
>> On Sat, Sep 18, 2021, 15:08 JING ZHANG <beyond1...@gmail.com> wrote:
>>
>>> Hi Yuval,
>>> You could open a JIRA to track this if you think some functions should
>>> be added as built-in functions in Flink.
>>>
>>> Best,
>>> JING ZHANG
>>>
>>> Yuval Itzchakov <yuva...@gmail.com> 于2021年9月18日周六 下午3:33写道:
>>>
>>>> The problem with defining a UDF is that you have to create one overload
>>>> per key type in the MULTISET. It would be very convenient to have functions
>>>> like Snowflakes ARRAY_AGG.
>>>>
>>>> On Sat, Sep 18, 2021, 05:43 JING ZHANG <beyond1...@gmail.com> wrote:
>>>>
>>>>> Hi Kai,
>>>>> AFAIK, there is no built-in function to extract the keys in MULTISET
>>>>> <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/types/>
>>>>>  to
>>>>> be an ARRAY. Define a UTF is a good solution.
>>>>>
>>>>> Best,
>>>>> JING ZHANG
>>>>>
>>>>> Kai Fu <zzfu...@gmail.com> 于2021年9月18日周六 上午7:35写道:
>>>>>
>>>>>> Hi team,
>>>>>>
>>>>>> We want to know if there is any built-in function to extract the keys
>>>>>> in MULTISET
>>>>>> <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/types/>
>>>>>> to be an ARRAY. There is no such function as far as we can find, except 
>>>>>> to
>>>>>> define a simple wrapper UDF for that, please advise.
>>>>>>
>>>>>> --
>>>>>> *Best wishes,*
>>>>>> *- Kai*
>>>>>>
>>>>>

Reply via email to