Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CC85180A7 for ; Wed, 24 Feb 2016 16:40:24 +0000 (UTC) Received: (qmail 61972 invoked by uid 500); 24 Feb 2016 16:40:18 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 61923 invoked by uid 500); 24 Feb 2016 16:40:18 -0000 Mailing-List: contact issues-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 issues@flink.apache.org Received: (qmail 61911 invoked by uid 99); 24 Feb 2016 16:40:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 16:40:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 19E092C14F0 for ; Wed, 24 Feb 2016 16:40:18 +0000 (UTC) Date: Wed, 24 Feb 2016 16:40:18 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-1159) Case style anonymous functions not supported by Scala API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163298#comment-15163298 ] ASF GitHub Bot commented on FLINK-1159: --------------------------------------- Github user stefanobaghino commented on the pull request: https://github.com/apache/flink/pull/1704#issuecomment-188343795 :+1: @StephanEwen I started working on the extension before the removal, will fix this as well, thanks for the feedback. > Case style anonymous functions not supported by Scala API > --------------------------------------------------------- > > Key: FLINK-1159 > URL: https://issues.apache.org/jira/browse/FLINK-1159 > Project: Flink > Issue Type: Bug > Components: Scala API > Reporter: Till Rohrmann > Assignee: Stefano Baghino > > In Scala it is very common to define anonymous functions of the following form > {code} > { > case foo: Bar => foobar(foo) > case _ => throw new RuntimeException() > } > {code} > These case style anonymous functions are not supported yet by the Scala API. Thus, one has to write redundant code to name the function parameter. > What works is the following pattern, but it is not intuitive for someone coming from Scala: > {code} > dataset.map{ > _ match{ > case foo:Bar => ... > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)