deniskuzZ commented on code in PR #5792: URL: https://github.com/apache/hive/pull/5792#discussion_r2081476028
########## 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: `It is done to find the specId and partition struct that correspond to the given partition name` - why can't we do this directly on `FILES` table? i.e. why do we need a lookup on `PARTITIONS ` table when `FILES` embeds partition information as well? ```` select FILE_PATH from default.ice_orc.FILES where `partition` = named_struct("event_src_trunc","AAA"); ```` -- 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