Re: ValidationException using DataTypeHint in Scalar Function

2020-11-09 Thread Steve Whelan
Timo and Dawid, Registering my UDF via the deprecated *registerFunction()* instead of the new *createTemporarySystemFunction()* worked. So it would appear there is some incompatibility with my implementation and the new registration system. I will wait for the Flip to be completed and retry then.

Re: ValidationException using DataTypeHint in Scalar Function

2020-11-09 Thread Timo Walther
Sorry for jumping in so late. I think Dawid gave a nice summary. As he said, integration of the DataStream <> Table integration is still under development. Until then I would suggest to option 3) which means don't upgrade the functions and use the old registration function `registerFunction`.

Re: ValidationException using DataTypeHint in Scalar Function

2020-11-09 Thread Dawid Wysakowicz
Hi Steve, Unfortunately the information you posted still does not explain how you ended up with *RAW('java.util.Map', ?)* for your input type. Would be best if you could share an example that I could use to reproduce it. I tried putting down some potential approaches: I tested it with a class ge

Re: ValidationException using DataTypeHint in Scalar Function

2020-11-08 Thread Steve Whelan
Hi Dawid, Just wanted to bump this thread in case you had any thoughts. Thanks, Steve On Thu, Oct 29, 2020 at 2:42 PM Steve Whelan wrote: > For some background, I am upgrading from Flink v1.9 to v1.11. So what I am > about to describe is our implementation on v1.9, which worked. I am trying >

Re: ValidationException using DataTypeHint in Scalar Function

2020-10-29 Thread Steve Whelan
For some background, I am upgrading from Flink v1.9 to v1.11. So what I am about to describe is our implementation on v1.9, which worked. I am trying to achieve the same functionality on v1.11. I have a DataStream whose type is an avro generated POJO, which contains a field *UrlParameters* that is

Re: ValidationException using DataTypeHint in Scalar Function

2020-10-29 Thread Dawid Wysakowicz
Sorry for a late reply. Could you share a complete, reproducible example? I am mostly interested in where do you get the input RAW('java.util.Map', '...') type that you are passing into your UDF. Raw types are equal/equivalent only if both the class and the serializer are equal. A side note: Hav

Re: ValidationException using DataTypeHint in Scalar Function

2020-10-27 Thread Steve Whelan
Hi Dawid, I added `*bridgedTo = Map.class*` as you suggested and got a slightly different exception. I also tried passing a rawSerializer (an implementation similar to MapSerializer[1] with String type key and value) but got the same exception as without it. I am using Flink v1.11 for reference.

Re: ValidationException using DataTypeHint in Scalar Function

2020-10-27 Thread Dawid Wysakowicz
Hey Steve, You should be able to do via the bridgedTo parameter. You can additionally specify a serializer you want to use via rawSerializer parameter:         @FunctionHint(                 input = {                         @DataTypeHint(value = "RAW", bridgedTo = Map.class[, rawSerializer = ...

Re: ValidationException using DataTypeHint in Scalar Function

2020-10-26 Thread Jark Wu
Hi Steve, Thanks for reaching out to the Flink community. I am pulling in Timo who might be able to help you with this question. Best, Jark On Mon, 26 Oct 2020 at 23:10, Steve Whelan wrote: > Hi, > > I have a column of type *RAW('java.util.Map', ?)* that I want to pass to > a scalar function

ValidationException using DataTypeHint in Scalar Function

2020-10-26 Thread Steve Whelan
Hi, I have a column of type *RAW('java.util.Map', ?)* that I want to pass to a scalar function UDF. I'm using DataTypeHints but hitting an exception. What would be the proper DataTypeHint and data type param to achieve this? @FunctionHint( input = {@DataTypeHint("RAW"), @DataTypeHint(