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 <[email protected]>
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;
}