Re: Flink 1.11.0 UDAF fails with "No match found for function signature fun()"

2020-07-29 Thread Dmytro Dragan
Hi Timo, Thank you for your time and your help! Described approach works. On 29/07/2020, 10:22, "Timo Walther" wrote: Hi Dmytro, I would not recommend to use internal functions from `org.apache.flink.table.planner.functions.aggfunctions`. They are called by a slightly d

Re: Flink 1.11.0 UDAF fails with "No match found for function signature fun()"

2020-07-29 Thread Timo Walther
Hi Dmytro, I would not recommend to use internal functions from `org.apache.flink.table.planner.functions.aggfunctions`. They are called by a slightly different stack that might cause this exception. Instead you can use the testing functions in `org.apache.flink.table.planner.runtime.utils.Ja

Re: Flink 1.11.0 UDAF fails with "No match found for function signature fun()"

2020-07-28 Thread Dmytro Dragan
Hi Timo, I have switched to 1.11.1. Create function using "create function ..." fails with magic: Caused by: java.lang.IndexOutOfBoundsException: Index: 110, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at c

Re: Flink 1.11.0 UDAF fails with "No match found for function signature fun()"

2020-07-27 Thread Timo Walther
Hi Dmytro, aggregate functions will support the new type system in Flink 1.12. Until then, they cannot be used with the new `call()` syntax as anonymous functions. In order to use the old type system, you need to register the function explicilty using SQL `CREATE FUNCTION a AS 'myFunc'` and t

Flink 1.11.0 UDAF fails with "No match found for function signature fun()"

2020-07-27 Thread Dmytro Dragan
Hi All, I see strange behavior of UDAF functions: Let`s say we have a simple table: EnvironmentSettings settings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build(); TableEnvironment t = TableEnvironment.create(settings); Table table = t.fromValues(DataTypes.ROW(