DataSet Conversion

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

DataSet Conversion

Lydia Ickler
Hi guys,

is it possible to convert a Java DataSet to a Scala Dataset?
Right now I get the following error:
Error:(102, 29) java: incompatible types: 'org.apache.flink.api.java.DataSet<java.lang.String> cannot be converted to org.apache.flink.api.scala.DataSet<java.lang.String>

Thanks in advance,
Lydia
Reply | Threaded
Open this post in threaded view
|

Re: DataSet Conversion

Stephan Ewen
Hi!

I think you can simply do "new org.apache.flink.api.scala.DataSet[T](javaSet)"

Greetings,
Stephan

On Mon, Jul 13, 2015 at 3:55 PM, Lydia Ickler <[hidden email]> wrote:
Hi guys,

is it possible to convert a Java DataSet to a Scala Dataset?
Right now I get the following error:
Error:(102, 29) java: incompatible types: 'org.apache.flink.api.java.DataSet<java.lang.String> cannot be converted to org.apache.flink.api.scala.DataSet<java.lang.String>

Thanks in advance,
Lydia

Reply | Threaded
Open this post in threaded view
|

Re: DataSet Conversion

Aljoscha Krettek
In reply to this post by Lydia Ickler
Hi Lydia,
it might work using new DataSet(javaSet) where DataSet is org.apache.flink.api.scala.DataSet. I'm not sure, however. What is your use case for this?

Cheers,
Aljoscha
On Mon, 13 Jul 2015 at 15:55 Lydia Ickler <[hidden email]> wrote:
Hi guys,

is it possible to convert a Java DataSet to a Scala Dataset?
Right now I get the following error:
Error:(102, 29) java: incompatible types: 'org.apache.flink.api.java.DataSet<java.lang.String> cannot be converted to org.apache.flink.api.scala.DataSet<java.lang.String>

Thanks in advance,
Lydia