From issues-return-167702-archive-asf-public=cust-asf.ponee.io@flink.apache.org Sat May 19 19:05:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 49DC418063B for ; Sat, 19 May 2018 19:05:04 +0200 (CEST) Received: (qmail 39415 invoked by uid 500); 19 May 2018 17:05:03 -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 39406 invoked by uid 99); 19 May 2018 17:05:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 May 2018 17:05:03 +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 C9E4E1A1743 for ; Sat, 19 May 2018 17:05:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id E6LGZBG7xTRh for ; Sat, 19 May 2018 17:05:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 47C0F5F1F0 for ; Sat, 19 May 2018 17:05:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7D26FE00FC for ; Sat, 19 May 2018 17:05:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 312A0212B7 for ; Sat, 19 May 2018 17:05:00 +0000 (UTC) Date: Sat, 19 May 2018 17:05:00 +0000 (UTC) From: "Xingcan Cui (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-8863) Add user-defined function support in SQL Client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-8863?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1648= 1693#comment-16481693 ]=20 Xingcan Cui commented on FLINK-8863: ------------------------------------ Hi [~twalthr], I got two questions during the implementation. 1. Why {{org.apache.flink.table.api.TableEnvironment}} only exposes a {{reg= isterFunction()}} method for {{ScalarFunction}}s? 2. Shall we add a hierarchy depth restriction for the parameters of a UDF c= onstructor? > Add user-defined function support in SQL Client > ----------------------------------------------- > > Key: FLINK-8863 > URL: https://issues.apache.org/jira/browse/FLINK-8863 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Reporter: Timo Walther > Assignee: Xingcan Cui > Priority: Major > > This issue is a subtask of part two "Full Embedded SQL Client" of the imp= lementation plan mentioned in=C2=A0[FLIP-24|https://cwiki.apache.org/conflu= ence/display/FLINK/FLIP-24+-+SQL+Client]. > It should be possible to declare user-defined functions in the SQL client= . For now, we limit the registration to classes that implement {{ScalarFunc= tion}}, {{TableFunction}}, {{AggregateFunction}}. Functions that are implem= ented in SQL are not part of this issue. > I would suggest to introduce a {{functions}} top-level property. The decl= aration could look similar to: > {code} > functions: > - name: testFunction > from: class <-- optional, default: = class > class: org.my.MyScalarFunction > constructor: <-- optional, needed fo= r certain types of functions > - 42.0 > - class: org.my.Class <-- possibility to create ob= jects via properties > constructor:=20 > - 1 > - true > - false > - "whatever" > - type: INT > value: 1 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)