difin commented on code in PR #5792:
URL: https://github.com/apache/hive/pull/5792#discussion_r2072159054
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergAcidUtil.java:
##########
@@ -243,14 +247,49 @@ public static long getDeleteFilePosition(Record rec) {
return rec.get(DELETE_FILE_META_COLS.get(MetadataColumns.ROW_POSITION),
Long.class);
}
+ private static long hashObjectArray(Object[] values) {
+ Hasher hasher = Hashing.murmur3_128().newHasher();
+
+ for (Object val : values) {
+ if (val == null) {
+ // Unique constant for null
+ hasher.putInt(0xDEADBEEF);
Review Comment:
> The number 0xDEADBEEF is a hexadecimal literal often used in programming
as a sentinel, debug marker, or placeholder value. It is interpreted as
-559038737 in Java
This is a unique constant for null to avoid 0 and null contribute the same
hashing value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]