Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy committed May 30, 2024
1 parent 45b8f32 commit e3330c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e3330c8

Please sign in to comment.