Re: SQL / Tuple question

Posted by Fabian Hueske-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/SQL-Tuple-question-tp9065p9066.html

Hi Radu,

you can pass the TypeInfo directly without accessing the TypeClass.

Have you tried this?

TypeInformation<Tuple2<String, Long>> tpinf = new TypeHint<Tuple2<String, Long>>(){}.getTypeInfo();        

.toDataStream( , tpinf )


Best, Fabian

2016-09-19 17:53 GMT+02:00 Radu Tudoran <[hidden email]>:

Hi,

 

I am trying to create an sql statement that is suppose to return a string and and integer

 

Mytable.sql(“select mystringfield,myintfield …. )

 

I am trying to give the typefinormation as a class to the

 

TypeInformation<Tuple2<String, Long>> tpinf = new TypeHint<Tuple2<String, Long>>(){}.getTypeInfo();

         

.toDataStream( , tpinf.getTypeClass() )

 

However I get the following error shown below.

Can someone give me an example of some working tuples for this case.

 

 

 

Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: Tuple needs to be parameterized by using generics.

     at