private static long getMinWriteID(AcidDirectory directory) {
      long minWriteID = Long.MAX_VALUE;
      for (AcidUtils.ParsedDelta delta : directory.getCurrentDirectories()) {
        minWriteID = Math.min(delta.getMinWriteId(), minWriteID);
        if (!delta.isDeleteDelta()) {
          break;
        }
      }
      return minWriteID;
    }
Get the min writeId for the new result directory. This only matters if the result directory will be a delta
directory i.e. minor compaction.
AcidUtils.Directory sorts delta directory names in alphabetical order: First it lists the delete deltas
(delete_delta_x_y) then deltas (delta_x_y), both sorted by x, which is the min write id we're looking for.
Get the the minimum value of x.
@param directory holds information about the deltas we are compacting
@return the smallest min write id found in deltas and delete deltas
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/QueryCompactor.java