okumin commented on code in PR #5792:
URL: https://github.com/apache/hive/pull/5792#discussion_r2072524182


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergAcidUtil.java:
##########
@@ -206,10 +207,11 @@ public static int parseSpecId(Record rec) {
     return rec.get(FILE_READ_META_COLS.get(MetadataColumns.SPEC_ID), 
Integer.class);
   }
 
-  public static long computePartitionHash(Record rec) {
+  public static long computePartitionHash(Table table, Record rec) {
     StructProjection part = 
rec.get(FILE_READ_META_COLS.get(PARTITION_STRUCT_META_COL), 
StructProjection.class);
+    Types.StructType partitionType = Partitioning.partitionType(table);
     // we need to compute a hash value for the partition struct so that it can 
be used as a sorting key
-    return computeHash(part);
+    return computeHash(partitionType).hash(part);

Review Comment:
   Disclaimer: This is an impression of myself who started looking at the 
change 1 min ago. I might change my stance tomorrow
   
   It seems strange that the value of a digest affects the result set. I would 
understand if the problem statement were "hash collisions are causing 
performance issues"



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to