You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Huang Xingbo (Jira)" <ji...@apache.org> on 2022/06/01 12:23:00 UTC
[jira] [Assigned] (FLINK-27797) PythonTableUtils.getCollectionInputFormat cannot correctly handle None values
[ https://issues.apache.org/jira/browse/FLINK-27797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Huang Xingbo reassigned FLINK-27797:
------------------------------------
Assignee: EMing Zhou
> 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
> Assignee: EMing Zhou
> Priority: Major
> Labels: pull-request-available
>
> 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)