You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Sendoh <un...@gmail.com> on 2017/12/08 10:19:19 UTC

TableException: GenericTypeInfo cannot be converted to Table

Hi Flink users,

I found the workarounds to resolve this exception in scala.
https://issues.apache.org/jira/browse/FLINK-6500

But I already provide the TypeInformation when deserializing json object,
and still see this exception.
Is there anything I ignore?

The sample code
https://gist.github.com/HungUnicorn/8a5c40fcf1e25c51cf77dc24a227d6d4

Best,

Sendoh



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: TableException: GenericTypeInfo cannot be converted to Table

Posted by Sendoh <un...@gmail.com>.
Thanks! don't know this works as well.

Cheers,

Sendoh



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: TableException: GenericTypeInfo cannot be converted to Table

Posted by Fabian Hueske <fh...@gmail.com>.
Yes.
Adding .returns(typeInfo) works as well. :-)

2017-12-08 11:29 GMT+01:00 Fabian Hueske <fh...@gmail.com>:

> Hi,
>
> you give the TypeInformation to your user code but you don't expose it to
> the DataStream API (the code of the FlatMapFunction is a black box for the
> API).
> You're FlatMapFunction should implement the ResultTypeQueryable interface
> and return the TypeInformation.
>
> Best, Fabian
>
> 2017-12-08 11:19 GMT+01:00 Sendoh <un...@gmail.com>:
>
>> Hi Flink users,
>>
>> I found the workarounds to resolve this exception in scala.
>> https://issues.apache.org/jira/browse/FLINK-6500
>>
>> But I already provide the TypeInformation when deserializing json object,
>> and still see this exception.
>> Is there anything I ignore?
>>
>> The sample code
>> https://gist.github.com/HungUnicorn/8a5c40fcf1e25c51cf77dc24a227d6d4
>>
>> Best,
>>
>> Sendoh
>>
>>
>>
>> --
>> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.
>> nabble.com/
>>
>
>

Re: TableException: GenericTypeInfo cannot be converted to Table

Posted by Fabian Hueske <fh...@gmail.com>.
Hi,

you give the TypeInformation to your user code but you don't expose it to
the DataStream API (the code of the FlatMapFunction is a black box for the
API).
You're FlatMapFunction should implement the ResultTypeQueryable interface
and return the TypeInformation.

Best, Fabian

2017-12-08 11:19 GMT+01:00 Sendoh <un...@gmail.com>:

> Hi Flink users,
>
> I found the workarounds to resolve this exception in scala.
> https://issues.apache.org/jira/browse/FLINK-6500
>
> But I already provide the TypeInformation when deserializing json object,
> and still see this exception.
> Is there anything I ignore?
>
> The sample code
> https://gist.github.com/HungUnicorn/8a5c40fcf1e25c51cf77dc24a227d6d4
>
> Best,
>
> Sendoh
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>

Re: TableException: GenericTypeInfo cannot be converted to Table

Posted by Sendoh <un...@gmail.com>.
Found it. I should use .returns(typeInformation) after the map function.





--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/