From e3330c80584582a4444dd0d3426bf9c775106d78 Mon Sep 17 00:00:00 2001 From: zouxxyy Date: Thu, 30 May 2024 23:38:46 +0800 Subject: [PATCH] update --- .../src/main/java/org/apache/paimon/data/BinaryWriter.java | 4 ---- .../main/java/org/apache/paimon/migrate/FileMetaUtils.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/paimon-common/src/main/java/org/apache/paimon/data/BinaryWriter.java b/paimon-common/src/main/java/org/apache/paimon/data/BinaryWriter.java index f1a30da69a8c..266e409e8b80 100644 --- a/paimon-common/src/main/java/org/apache/paimon/data/BinaryWriter.java +++ b/paimon-common/src/main/java/org/apache/paimon/data/BinaryWriter.java @@ -212,9 +212,5 @@ static ValueSetter createValueSetter(DataType elementType) { /** Accessor for setting the elements of a binary writer during runtime. */ interface ValueSetter extends Serializable { void setValue(BinaryWriter writer, int pos, Object value); - - default void setNull(BinaryWriter writer, int pos) { - writer.setNullAt(pos); - } } } diff --git a/paimon-core/src/main/java/org/apache/paimon/migrate/FileMetaUtils.java b/paimon-core/src/main/java/org/apache/paimon/migrate/FileMetaUtils.java index 8a7e9621c8e1..2e4409eb6995 100644 --- a/paimon-core/src/main/java/org/apache/paimon/migrate/FileMetaUtils.java +++ b/paimon-core/src/main/java/org/apache/paimon/migrate/FileMetaUtils.java @@ -183,7 +183,7 @@ public static BinaryRow writePartitionValue( for (int i = 0; i < fields.size(); i++) { String partitionName = partitionValues.get(fields.get(i).name()); if (partitionName.equals(partitionDefaultName)) { - valueSetters.get(i).setNull(binaryRowWriter, i); + binaryRowWriter.setNullAt(i); } else { Object value = TypeUtils.castFromString(partitionName, fields.get(i).type()); valueSetters.get(i).setValue(binaryRowWriter, i, value);