Re: Creating a generic ARRAY_AGG aggregate function for Flink SQL

2021-08-24 Thread Yuval Itzchakov
Hi Guys, @Ingo Bürk Thanks for that, but I need this function sooner rather than later. Would be happy to contribute it back once I get it to work :) @Caizhi Weng The gist was not in the correct version. I can't return an Array[T] since it will always be an Array[Object] at runtime, and that's n

Re: Creating a generic ARRAY_AGG aggregate function for Flink SQL

2021-08-23 Thread Ingo Bürk
Hi, just FYI, we do already have issues in JIRA for this: * https://issues.apache.org/jira/browse/FLINK-21949 * https://issues.apache.org/jira/browse/FLINK-22484 Best Ingo On Tue, Aug 24, 2021 at 8:23 AM Caizhi Weng wrote: > Hi! > > As far as I know, returning an array from the getValue metho

Re: Creating a generic ARRAY_AGG aggregate function for Flink SQL

2021-08-23 Thread Caizhi Weng
Hi! As far as I know, returning an array from the getValue method containing external data format is OK. Flink will do the conversion for you. Are you faced with any exception when using this array_agg? If yes what's the exception stack? You can also open a JIRA ticket to require a built-in supp

Creating a generic ARRAY_AGG aggregate function for Flink SQL

2021-08-23 Thread Yuval Itzchakov
Hi, I'm trying to implement a generic ARRAY_AGG UDF function (identical to the one that exists in many data WHs, e.g https://docs.snowflake.com/en/sql-reference/functions/array_agg.html) to utilize in Flink SQL. Taking reference from CollectAggFunction