private boolean hasDeleteOrAbortedDirectories(AcidDirectory directory) {
    if (!directory.getCurrentDirectories().isEmpty()) {
      return directory.getCurrentDirectories().stream()
              .anyMatch(AcidUtils.ParsedDeltaLight::isDeleteDelta) || !directory.getAbortedDirectories().isEmpty();
    }
    return true;
  }
Scan a directory for delete deltas or aborted directories.
@param directory the directory to be scanned
@return true, if delete or aborted directory found
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MergeCompactor.java