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


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java:
##########
@@ -337,151 +341,16 @@ protected Boolean findNextCompactionAndExecute(boolean 
collectGenericStats, bool
 
       checkInterrupt();
 
-      String fullTableName = TxnUtils.getFullTableName(table.getDbName(), 
table.getTableName());
-
-
-      // Find the partition we will be working with, if there is one.
-      Partition p;
-      try {
-        p = resolvePartition(ci);
-        if (p == null && ci.partName != null) {
-          ci.errorMessage = "Unable to find partition " + 
ci.getFullPartitionName() + ", assuming it was dropped and moving on.";
-          LOG.warn(ci.errorMessage + " Compaction info: {}", ci);
-          msc.markRefused(CompactionInfo.compactionInfoToStruct(ci));
-          return false;
-        }
-      } catch (Exception e) {
-        LOG.error("Unexpected error during resolving partition.", e);
-        ci.errorMessage = e.getMessage();
-        msc.markFailed(CompactionInfo.compactionInfoToStruct(ci));
-        return false;
-      }
-
-      checkInterrupt();
-
-      // Find the appropriate storage descriptor
-      final StorageDescriptor sd =  resolveStorageDescriptor(table, p);
+      CompactionExecutor compactionExecutor;
 
-      // Check that the table or partition isn't sorted, as we don't yet 
support that.
-      if (sd.getSortCols() != null && !sd.getSortCols().isEmpty()) {
-        ci.errorMessage = "Attempt to compact sorted table " + 
ci.getFullTableName() + ", which is not yet supported!";
-        LOG.warn(ci.errorMessage + " Compaction info: {}", ci);
-        msc.markRefused(CompactionInfo.compactionInfoToStruct(ci));
-        return false;
+      if (MetaStoreUtils.isIcebergTable(table.getParameters())) {

Review Comment:
   use factory to create a proper strategy
   cc @veghlaci05 on generic redesign



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