deniskuzZ commented on code in PR #5792:
URL: https://github.com/apache/hive/pull/5792#discussion_r2098165302
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergQueryCompactor.java:
##########
@@ -96,31 +128,50 @@ public boolean run(CompactorContext context) throws
IOException, HiveException,
throw new HiveException(ErrorMsg.COMPACTION_NO_PARTITION);
}
} else {
- long partitionHash = IcebergTableUtil.getPartitionHash(icebergTable,
partSpec);
+ HiveConf.setBoolVar(conf, ConfVars.HIVE_CONVERT_JOIN, false);
+ conf.setBoolVar(ConfVars.HIVE_VECTORIZATION_ENABLED, false);
HiveConf.setVar(conf, ConfVars.REWRITE_POLICY,
RewritePolicy.PARTITION.name());
- conf.set(IcebergCompactionService.PARTITION_PATH, new
Path(partSpec).toString());
+ conf.set(IcebergCompactionService.PARTITION_PATH, new
Path(ci.partName).toString());
- Map<String, String> partSpecMap = new LinkedHashMap<>();
- Warehouse.makeSpecFromName(partSpecMap, new Path(partSpec), null);
+ PartitionSpec spec;
+ try {
+ spec = IcebergTableUtil.getPartitionSpec(icebergTable, ci.partName);
+ } catch (MetaException e) {
+ throw new HiveException(e);
+ }
+ String partitionPredicate = buildPartitionPredicate(ci, spec);
Review Comment:
Where do you check for null? if you don't need maybe throw exception in
getPartitionSpec?
--
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]