You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by hx...@apache.org on 2022/06/01 12:49:44 UTC

[flink] branch release-1.15 updated: [FLINK-27797][python] Fix the issue that PythonTableUtils.getCollectionInputFormat cannot correctly handle None values

This is an automated email from the ASF dual-hosted git repository.

hxb pushed a commit to branch release-1.15
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.15 by this push:
     new d5edd4c3469 [FLINK-27797][python] Fix the issue that PythonTableUtils.getCollectionInputFormat cannot correctly handle None values
d5edd4c3469 is described below

commit d5edd4c346985483179504e23d98182941b1657a
Author: jaydonzhou <ja...@tencent.com>
AuthorDate: Fri May 27 19:43:38 2022 +0800

    [FLINK-27797][python] Fix the issue that PythonTableUtils.getCollectionInputFormat cannot correctly handle None values
    
    This closes #19834.
---
 .../java/org/apache/flink/table/utils/python/PythonTableUtils.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/flink-python/src/main/java/org/apache/flink/table/utils/python/PythonTableUtils.java b/flink-python/src/main/java/org/apache/flink/table/utils/python/PythonTableUtils.java
index a7b6d49b0b8..f406c475edf 100644
--- a/flink-python/src/main/java/org/apache/flink/table/utils/python/PythonTableUtils.java
+++ b/flink-python/src/main/java/org/apache/flink/table/utils/python/PythonTableUtils.java
@@ -512,7 +512,9 @@ public final class PythonTableUtils {
         }
 
         return c -> {
-            if (c.getClass() != byte[].class || dataType instanceof PickledByteArrayTypeInfo) {
+            if (c == null
+                    || c.getClass() != byte[].class
+                    || dataType instanceof PickledByteArrayTypeInfo) {
                 return c;
             }