[ 
https://issues.apache.org/jira/browse/FLINK-15974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17034316#comment-17034316
 ] 

Dian Fu edited comment on FLINK-15974 at 2/11/20 10:03 AM:
-----------------------------------------------------------

[~twalthr] I have replied on the ML regarding to FLIP-55. Regarding to this 
JIRA itself, I think we could support both of the following in the Python Table 
API:
{code}
table.select(call(inc, col("id"))) \
         .insert_into("sink")

table.select(inc("id")) \
         .insert_into("sink")
{code}

The first example is to align with Java Table API(align with FLIP-55) and the 
second example(proposed in this JIRA) could be seen as syntax sugar for Python 
users as it makes use of Python specific features.


was (Author: dian.fu):
[~twalthr] I have replied on the ML regarding to FLIP-55. Regarding to this 
JIRA itself, I think we could support both of the following in the Python Table 
API:
{code}
table.select(call(inc, col("id"))) \
         .insert_into("sink")

table.select(inc("id")) \
         .insert_into("sink")
{code}

The first example is to align with Java Table API(FLIP-55) and the second 
example(proposed by this JIRA) could be seen as syntax sugar for Python users 
as it makes use of features provided by Python.

> Support to use the Python UDF directly in the Python Table API
> --------------------------------------------------------------
>
>                 Key: FLINK-15974
>                 URL: https://issues.apache.org/jira/browse/FLINK-15974
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Python
>            Reporter: Dian Fu
>            Priority: Major
>             Fix For: 1.11.0
>
>
> Currently, a Python UDF has been registered before using in Python Table API, 
> e.g.
> {code}
> t_env.register_function("inc", inc)
> table.select("inc(id)") \
>          .insert_into("sink")
> {code}
> It would be great if we could support to use Python UDF directly in the 
> Python Table API, e.g.
> {code}
> table.select(inc("id")) \
>          .insert_into("sink")
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to