Skip to content

Commit 07b9776

Browse files
authored
[cdc] Fix canal cdc data field value is null judgment condition. (#5151)
1 parent 1d5245c commit 07b9776

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paimon-core/src/main/java/org/apache/paimon/utils/JsonSerdeUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static <V> LinkedHashMap<String, V> parseJsonMap(String jsonString, Class
108108
public static <T extends JsonNode> T getNodeAs(
109109
JsonNode root, String fieldName, Class<T> clazz) {
110110
JsonNode node = root.get(fieldName);
111-
if (node == null) {
111+
if (isNull(node)) {
112112
return null;
113113
}
114114

@@ -224,7 +224,7 @@ public static <T> T extractValueOrDefault(
224224
throws JsonProcessingException {
225225
for (String key : path) {
226226
jsonNode = jsonNode.get(key);
227-
if (jsonNode == null) {
227+
if (isNull(jsonNode)) {
228228
if (defaultValue != null) {
229229
return defaultValue;
230230
}
@@ -244,7 +244,7 @@ public static <T> T extractValue(JsonNode jsonNode, Class<T> valueType, String..
244244
public static boolean isNodeExists(JsonNode jsonNode, String... path) {
245245
for (String key : path) {
246246
jsonNode = jsonNode.get(key);
247-
if (jsonNode == null) {
247+
if (isNull(jsonNode)) {
248248
return false;
249249
}
250250
}

0 commit comments

Comments
 (0)