flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasiliki Kalavri <vasilikikala...@gmail.com>
Subject Re: Bug while using Table API
Date Wed, 04 May 2016 15:33:24 GMT
Thanks Simone! I've managed to reproduce the error. I'll try to figure out
what's wrong and I'll keep you updated.

-Vasia.
On May 4, 2016 3:25 PM, "Simone Robutti" <simone.robutti@radicalbit.io>
wrote:

> Here is the code:
>
> package org.example
>
> import org.apache.flink.api.scala._
> import org.apache.flink.api.table.TableEnvironment
>
> object Job {
>   def main(args: Array[String]) {
>     // set up the execution environment
>     val env = ExecutionEnvironment.getExecutionEnvironment
>     val tEnv = TableEnvironment.getTableEnvironment(env)
>
>
>     val input = env.fromElements(WC("hello", 1), WC("hello", 1),
> WC("ciao", 1))
>     val expr = tEnv.fromDataSet(input)
>     val result = expr
>       .groupBy("word")
>       .select("word , count.sum as count")
>     tEnv.toDataSet[WC](result).print()
>
>     env.execute("Flink Scala API Skeleton")
>   }
> }
>
> case class WC(word:String,count:Int)
>
>
>

Mime
View raw message