Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 984CE200AE3 for ; Wed, 4 May 2016 17:49:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96A6D1609FC; Wed, 4 May 2016 15:49:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DD4531609A1 for ; Wed, 4 May 2016 17:49:20 +0200 (CEST) Received: (qmail 44135 invoked by uid 500); 4 May 2016 15:34:20 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 44125 invoked by uid 99); 4 May 2016 15:34:20 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 15:34:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 66EEC1A51F1 for ; Wed, 4 May 2016 15:33:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7j62m3MFeXf5 for ; Wed, 4 May 2016 15:33:32 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 6DD1F60D3C for ; Wed, 4 May 2016 15:33:32 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id y84so64893226lfc.0 for ; Wed, 04 May 2016 08:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=PekSna4vpQO7d5DhuYocC0Q7Ms8Yt03DOcEVpNmCd60=; b=vCouddYkJrZu6PNB2QRV6ZMWUvOcPdrBUBQoA9dUVRsIMpBTvyjOgP6C7SoAc8+uZa FJq58HGs67ZZGdfVYJbJFe//HCsKDLZb7UaZa+t5e2dAt7yeMtFeCIGGft7yTaeSLbRz G7ue98GXHm379g3QIDGbg0V1AqAywBF5GeKMlltaMVL1Guj3mswuwnEtEzXgwhDSTliU uwZEQcEsDzZpMqRivr5dm5SlTsElUkZ6rxpC7J/S5GLz36nQlCiGD/RFXQLUBTKBmJ+C mo8iSHdzqjk/DKOv375NXi/F04SXD5CUxS/afUdm0TLiI6enuQvBaH16vL7NBORvkR7+ cDmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=PekSna4vpQO7d5DhuYocC0Q7Ms8Yt03DOcEVpNmCd60=; b=YnVZfZinCoVPZ8hYWd6VeagM0+26gxHF5tgHKTrrxt0+PYbgOuZtP7WkH7LLbsUZ3g x4POdMyEj2gX3/PZ4YRhsceFHhclHtsObFWpbbC+qVQ28UQNC1XGfAkYOyJ39zfUkpB0 hDs1L4wtmitF5asBXlt0dJfzbgk9EJeE0XODF8UpfuCpRHMZ/WOLtgXqGUG9SvbPpZWc OfayaAvinhYcMQCneD87eSohmAsX3RlaBajgl9DHVURpJA6TGsGm/md6QRtAcy0LeKlS ZIdjBQAQD0TaglSsOfn0f7D8ywze/Lm+ymekJkFx0eU+mGHUNLQHO1yafcO3fXRerfmV xUzg== X-Gm-Message-State: AOPr4FXeCvQ6OcASe9PapuHCg0VQ0NRN5u9cknuDjjx27fuoI3STfB0djHKWC3f3Xi79pqA1o06WwbxhcDY6/g== MIME-Version: 1.0 X-Received: by 10.112.169.65 with SMTP id ac1mr4334851lbc.92.1462376005029; Wed, 04 May 2016 08:33:25 -0700 (PDT) Received: by 10.25.37.67 with HTTP; Wed, 4 May 2016 08:33:24 -0700 (PDT) Received: by 10.25.37.67 with HTTP; Wed, 4 May 2016 08:33:24 -0700 (PDT) In-Reply-To: References: Date: Wed, 4 May 2016 17:33:24 +0200 Message-ID: Subject: Re: Bug while using Table API From: Vasiliki Kalavri To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a11c25af84ed6dd053205f2c3 archived-at: Wed, 04 May 2016 15:49:21 -0000 --001a11c25af84ed6dd053205f2c3 Content-Type: text/plain; charset=UTF-8 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" 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) > > > --001a11c25af84ed6dd053205f2c3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Thanks Simone! I've managed to reproduce the error. I= 9;ll try to figure out what's wrong and I'll keep you updated.

-Vasia.

On May 4, 2016 3:25 PM, "Simone Robutti&quo= t; <simone.robutti@radic= albit.io> wrote:
Here is the code:

packag= e org.example

import org.apache.flink.api.scala._<= /div>
import org.apache.flink.api.table.TableEnvironment

=
object Job {
=C2=A0 def main(args: Array[String]) {
=C2=A0 =C2=A0 // set up the execution environment
=C2=A0 = =C2=A0 val env =3D ExecutionEnvironment.getExecutionEnvironment
= =C2=A0 =C2=A0 val tEnv =3D TableEnvironment.getTableEnvironment(env)
<= div>

=C2=A0 =C2=A0 val input =3D env.fromEleme= nts(WC("hello", 1), WC("hello", 1), WC("ciao"= , 1))
=C2=A0 =C2=A0 val expr =3D tEnv.fromDataSet(input)
=C2=A0 =C2=A0 val result =3D expr
=C2=A0 =C2=A0 =C2=A0 .groupBy= ("word")
=C2=A0 =C2=A0 =C2=A0 .select("word , coun= t.sum as count")
=C2=A0 =C2=A0 tEnv.toDataSet[WC](result).pr= int()

=C2=A0 =C2=A0 env.execute("Flink Scala = API Skeleton")
=C2=A0 }
}

case class WC(word:String,count:Int)


--001a11c25af84ed6dd053205f2c3--