Re: Stream sql example

2017-06-09 Thread Dawid Wysakowicz
Thanks a lot Timo, after I added the ResultTypeQueryable interface to my mapper it worked. As for the SongEvent the reason I tried remapping it to Row is that it has an enum field on which I want to filter, so my first approach was to remap it in TableSource to String. What do you think should be t

Re: Stream sql example

2017-06-09 Thread Timo Walther
Hi David, I think the problem is that the type of the DataStream produced by the TableSource, does not match the type that is declared in the ` getReturnType()`. A `MapFunction` is always a generic type (because Row cannot be analyzed). A solution would be that the mapper implements `ResultTy

Re: Stream sql example

2017-06-09 Thread Dawid Wysakowicz
Sorry forgot to add the link: https://gist.github.com/dawidwys/537d12a6f2355cba728bf93f1af87b45 Z pozdrowieniami! / Cheers! Dawid Wysakowicz *Data/Software Engineer* Skype: dawid_wys | Twitter: @OneMoreCoder 2017-06-09 20:19 GMT+02:00 Dawid Wysakowicz : > Hi, > I tri

Stream sql example

2017-06-09 Thread Dawid Wysakowicz
Hi, I tried writing a simple sql query with custom StreamTableSource and it fails with error: org.apache.flink.table.codegen.CodeGenException: Arity of result type does >> not match number of expressions. > > at >> org.apache.flink.table.codegen.CodeGenerator.generateResultExpression(CodeGenerator