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


##########
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:
   Partition hash value is assumed to uniquely identify a partition and this 
assumption is used in constructing Iceberg compaction query.



-- 
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