Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85574179E4 for ; Mon, 13 Apr 2015 10:18:17 +0000 (UTC) Received: (qmail 86700 invoked by uid 500); 13 Apr 2015 10:18:17 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 86634 invoked by uid 500); 13 Apr 2015 10:18:17 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 86623 invoked by uid 99); 13 Apr 2015 10:18:17 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 10:18:17 +0000 Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D34B41A0053 for ; Mon, 13 Apr 2015 10:18:16 +0000 (UTC) Received: by layy10 with SMTP id y10so53431281lay.0 for ; Mon, 13 Apr 2015 03:18:15 -0700 (PDT) X-Gm-Message-State: ALoCoQlaGtqlP0gFYJ+lbFHV+k7FE7zcm24tT6RgDaCdXLVzF7fJw5HMAuP/2mIbpvirI/GIzOLP X-Received: by 10.152.25.227 with SMTP id f3mr12334456lag.67.1428920295389; Mon, 13 Apr 2015 03:18:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.31.15 with HTTP; Mon, 13 Apr 2015 03:17:54 -0700 (PDT) In-Reply-To: References: From: Maximilian Michels Date: Mon, 13 Apr 2015 12:17:54 +0200 Message-ID: Subject: Re: [QUESTION] Scala Table API syntax To: dev@flink.apache.org Content-Type: multipart/alternative; boundary=089e0160bc449e94ac0513986e3a --089e0160bc449e94ac0513986e3a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hadn't thought about that but it makes perfect sense. Very handy. On Mon, Apr 13, 2015 at 12:02 PM, Aljoscha Krettek wrote: > @Till: Correct > > On Mon, Apr 13, 2015 at 10:52 AM, Till Rohrmann > wrote: > > IMO the symbol notation makes it slightly easier to write Table API > > expressions, because the IDE can assist you in what operations are > > supported by the expression DSL whereas the string notation will only > give > > you a syntax error upon compilation, right? > > > > On Mon, Apr 13, 2015 at 10:42 AM, Maximilian Michels > wrote: > > > >> 'Symbol is actually syntactic sugar for Symbol("Symbol") which is part > of > >> the Scala standard library. It is a core feature of Scala which IMO is > >> perfectly fine to use. I'm not sure whether it makes the expression mu= ch > >> easier to read but it is a neat feature already in place. > >> > >> @Stephan: As far as I know, the String-based parsing is already > possible in > >> the Scala Table API. > >> > >> On Sun, Apr 12, 2015 at 2:51 PM, Stephan Ewen wrote= : > >> > >> > I am not a deep Scala progammer either, but I think the symbols are = a > >> > pretty wide-spread concept. > >> > For example, the Scalding tuple API makes heavy use of them as well. > >> > > >> > That said, I do like the idea that the Scala Table API supports the > >> string > >> > variant as well, for homogeneity. > >> > > >> > On Sun, Apr 12, 2015 at 1:12 PM, Ufuk Celebi wrote: > >> > > >> > > Hey all, > >> > > > >> > > I am not very proficient with Scala and have some questions > regarding > >> the > >> > > Scala Table API: > >> > > > >> > > The logical queries in the Java API are all String-based, e.g. > >> > > > >> > > table.groupBy("word") > >> > > > >> > > In the Scala API, this works as well, but what's further possible = is > >> > this: > >> > > > >> > > expr.groupBy('word) > >> > > > >> > > For comparisions you use something like `a =3D=3D=3D `b. Note that= the ' > is a > >> > > Scala symbol. > >> > > > >> > > - How common is this kind of notation for Scala users? > >> > > - Are both types of expressions equivalent or can you do more with > the > >> > > special Scala syntax Table API? > >> > > > >> > > I am asking, because I was wondering whether we should stick to th= e > >> > > String-based notation in the docs and have the special syntax as a= n > >> > > optional thing. There is no reason for this, if this is common in > the > >> > Scala > >> > > world though. :-) > >> > > > >> > > =E2=80=93 Ufuk > >> > > > >> > > >> > --089e0160bc449e94ac0513986e3a--