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

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

Dian Fu created FLINK-18836:
-------------------------------

             Summary: 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: Improvement
          Components: API / Python
    Affects Versions: 1.11.0
            Reporter: Dian Fu
             Fix For: 1.12.0, 1.11.2


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)