TableException: GenericTypeInfo<Row> cannot be converted to Table

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

TableException: GenericTypeInfo<Row> cannot be converted to Table

Hung
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/
Reply | Threaded
Open this post in threaded view
|

Re: TableException: GenericTypeInfo<Row> cannot be converted to Table

Hung
Found it. I should use .returns(typeInformation) after the map function.





--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: TableException: GenericTypeInfo<Row> cannot be converted to Table

Fabian Hueske-2
In reply to this post by Hung
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 <[hidden email]>:
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/

Reply | Threaded
Open this post in threaded view
|

Re: TableException: GenericTypeInfo<Row> cannot be converted to Table

Fabian Hueske-2
Yes.
Adding .returns(typeInfo) works as well. :-)

2017-12-08 11:29 GMT+01:00 Fabian Hueske <[hidden email]>:
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 <[hidden email]>:
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/


Reply | Threaded
Open this post in threaded view
|

Re: TableException: GenericTypeInfo<Row> cannot be converted to Table

Hung
In reply to this post by Fabian Hueske-2
Thanks! don't know this works as well.

Cheers,

Sendoh



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