deniskuzZ commented on code in PR #5529:
URL: https://github.com/apache/hive/pull/5529#discussion_r1861813300
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -2232,4 +2233,59 @@ private static List<FieldSchema>
schema(List<VirtualColumn> exprs) {
private static List<FieldSchema> orderBy(VirtualColumn... exprs) {
return schema(Arrays.asList(exprs));
}
+
+ @Override
+ public boolean canCompact(HiveConf hiveConf,
org.apache.hadoop.hive.ql.metadata.Table table, String partitionPath,
Review Comment:
1. that shouldn't be part of StorageHandler API, it's Compactor
responsibility, please take a look at
https://github.com/apache/amoro/blob/master/amoro-format-iceberg/src/main/java/org/apache/amoro/optimizing/plan/CommonPartitionEvaluator.java,
maybe follow a similar design. Not sure, but we might even reuse some of their
code by adding amoro lib to Hive.
2. consider rename to `isEligibleForCompaction`
3. you can use Partish abstraction that could be either Table or Partition
4. hiveConf should be probably the last param
--
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]