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

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 07b9776834 [cdc] Fix canal cdc data field value is null judgment 
condition. (#5151)
07b9776834 is described below

commit 07b9776834aba0f0c0a5effe83bdf3714e1c72f5
Author: Kerwin <[email protected]>
AuthorDate: Tue Feb 25 19:22:35 2025 +0800

    [cdc] Fix canal cdc data field value is null judgment condition. (#5151)
---
 .../src/main/java/org/apache/paimon/utils/JsonSerdeUtil.java        | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/paimon-core/src/main/java/org/apache/paimon/utils/JsonSerdeUtil.java 
b/paimon-core/src/main/java/org/apache/paimon/utils/JsonSerdeUtil.java
index edc6dac5f9..0f089452e6 100644
--- a/paimon-core/src/main/java/org/apache/paimon/utils/JsonSerdeUtil.java
+++ b/paimon-core/src/main/java/org/apache/paimon/utils/JsonSerdeUtil.java
@@ -108,7 +108,7 @@ public class JsonSerdeUtil {
     public static <T extends JsonNode> T getNodeAs(
             JsonNode root, String fieldName, Class<T> clazz) {
         JsonNode node = root.get(fieldName);
-        if (node == null) {
+        if (isNull(node)) {
             return null;
         }
 
@@ -224,7 +224,7 @@ public class JsonSerdeUtil {
             throws JsonProcessingException {
         for (String key : path) {
             jsonNode = jsonNode.get(key);
-            if (jsonNode == null) {
+            if (isNull(jsonNode)) {
                 if (defaultValue != null) {
                     return defaultValue;
                 }
@@ -244,7 +244,7 @@ public class JsonSerdeUtil {
     public static boolean isNodeExists(JsonNode jsonNode, String... path) {
         for (String key : path) {
             jsonNode = jsonNode.get(key);
-            if (jsonNode == null) {
+            if (isNull(jsonNode)) {
                 return false;
             }
         }

Reply via email to