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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergQueryCompactor.java:
##########
@@ -96,16 +106,46 @@ public boolean run(CompactorContext context) throws 
IOException, HiveException,
         throw new HiveException(ErrorMsg.COMPACTION_NO_PARTITION);
       }
     } else {
-      long partitionHash = IcebergTableUtil.getPartitionHash(icebergTable, 
partSpec);
+      Pair<Integer, StructProjection> partSpecPair =
+          IcebergTableUtil.getPartitionSpecIdAndStruct(icebergTable, partSpec);

Review Comment:
   > To do that I am listing partitions table to find the spec id and the 
partition struct for the given ci.partName and applying conversions to get the 
values that can be used in the condition on partition field from files 
metastable.
   
   `partition` struct in the PARTITIONS table == `partition` struct in the 
`FILES` table, so I still don't understand why we can't directly look up the 
`FILES` table? 
   From the above example, what do we pass in `partitionPath`: 
`event_src_trunc=BBB/event_time_month=2024-08`?  Based on that can we construct 
a proper named_struct filter?  
   ````
   Map<String, String> specFromName = makeSpecFromName(partitionPath);
   TransformType type = TransformSpec.fromString(specFromName.key);
   ...
   ````
   



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