1
0

[HUDI-4336] Fix records overwritten bug with binary primary key (#5996)

This commit is contained in:
luoyajun
2022-06-30 09:12:00 +08:00
committed by GitHub
parent 03a94d9ff5
commit 3948b8935a
2 changed files with 20 additions and 1 deletions

View File

@@ -19,6 +19,7 @@
package org.apache.hudi.common.util;
import javax.annotation.Nullable;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@@ -88,7 +89,10 @@ public class StringUtils {
}
public static String objToString(@Nullable Object obj) {
return obj == null ? null : obj.toString();
if (obj == null) {
return null;
}
return obj instanceof ByteBuffer ? toHexString(((ByteBuffer) obj).array()) : obj.toString();
}
/**