You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dian Fu (Jira)" <ji...@apache.org> on 2020/10/20 02:29:00 UTC

[jira] [Commented] (FLINK-18836) Python UDTF doesn't work well when the return type isn't generator

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

Dian Fu commented on FLINK-18836:
---------------------------------

[~hxbks2ks] Could you submit a PR for release-1.11? It has conflicts with release-1.11 and I think we should also backport this fix to 1.11.

> Python UDTF doesn't work well when the return type isn't generator
> ------------------------------------------------------------------
>
>                 Key: FLINK-18836
>                 URL: https://issues.apache.org/jira/browse/FLINK-18836
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Python
>    Affects Versions: 1.11.0
>            Reporter: Dian Fu
>            Assignee: Huang Xingbo
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0, 1.11.3
>
>
> For the following Python UDTF which return type is not a generator:
> {code}
> # test specify the input_types
> @udtf(input_types=[DataTypes.BIGINT()],
>            result_types=[DataTypes.BIGINT(), DataTypes.BIGINT(), DataTypes.BIGINT()])
> def split(x):
>     return Row(10, 10, 10)
> {code}
> When used in a job, the operator containing the UDTF will not emit data to the downstream operator and there is also no exception thrown. The job just finished without any result.
> We should properly handle this case: either support this use case or throw a proper exception if we don't want to support this case.



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