You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "EMing Zhou (Jira)" <ji...@apache.org> on 2022/05/27 11:22:00 UTC

[jira] [Commented] (FLINK-27797) PythonTableUtils.getCollectionInputFormat cannot correctly handle None values

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

EMing Zhou commented on FLINK-27797:
------------------------------------

can I get this ticket?

> PythonTableUtils.getCollectionInputFormat cannot correctly handle None values
> -----------------------------------------------------------------------------
>
>                 Key: FLINK-27797
>                 URL: https://issues.apache.org/jira/browse/FLINK-27797
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Python
>    Affects Versions: 1.15.0
>            Reporter: Yunfeng Zhou
>            Priority: Major
>
> In `PythonTableUtils.getCollectionInputFormat` there are implementations like follows.
> This code can be found at [https://github.com/apache/flink/blob/8488368b86a99a064446ca74e775b67ffff0b94a/flink-python/src/main/java/org/apache/flink/table/utils/python/PythonTableUtils.java#L515]
> ```
> c -> {
>             if (c.getClass() != byte[].class || dataType instanceof PickledByteArrayTypeInfo) {
>                 return c;
>             }
> ```
> Here, the generated function did not check `c != null` before doing `c.getClass()`. which might cause that tables created through pyflink cannot parse it when values are `None`.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)