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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java:
##########
@@ -1008,10 +1012,20 @@ public void 
preDropPartitions(org.apache.hadoop.hive.metastore.api.Table hmsTabl
       preDropPartitions(hmsTable, context, partExprs);
     } else if (partsSpec.isSetNames()) {
       preTruncateTable(hmsTable, context, partsSpec.getNames());
+      cleanupCompactionRecords(hmsTable, partsSpec.getNames());
     }
     context.putToProperties(ThriftHiveMetaStoreClient.SKIP_DROP_PARTITION, 
"true");
   }
 
+  private void 
cleanupCompactionRecords(org.apache.hadoop.hive.metastore.api.Table hmsTable,
+      List<String> partitionNames) throws MetaException {
+    if (CollectionUtils.isEmpty(partitionNames)) {
+      return;
+    }
+    TxnStore txnHandler = TxnUtils.getTxnStore(conf);

Review Comment:
   i think that should be set in constructor or init. see 
IcebergHouseKeeperService



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

Reply via email to