@VisibleForTesting
    protected static boolean isQualifiedDeleteDeltaForSplit(AcidOutputFormat.Options orcSplitMinMaxWriteIds,
        AcidInputFormat.DeltaMetaData deleteDelta, Integer stmtId) {
      // We allow equal writeIds so we are prepared for multi statement transactions.
      // In this case we have to check the stmt id.
      if (orcSplitMinMaxWriteIds.getMinimumWriteId() == deleteDelta.getMaxWriteId()) {
        int orcSplitStmtId = orcSplitMinMaxWriteIds.getStatementId();
        // StatementId -1 and 0 is also used as the default one if it is not provided.
        // Not brave enough to fix generally, so just fix here.
        if (orcSplitStmtId == -1) {
          orcSplitStmtId = 0;
        }
        if (stmtId == null || stmtId == -1) {
          stmtId = 0;
        }
        return orcSplitStmtId < stmtId;
      }
      // For delta_0000012_0000014_0000, no need to read delete delta folders < 12.
      return orcSplitMinMaxWriteIds.getMinimumWriteId() < deleteDelta.getMaxWriteId();
    }
Check if the delete delta folder needs to be scanned for a given split's min/max write ids.

@param orcSplitMinMaxWriteIds
@param deleteDelta
@param stmtId statementId of the deleteDelta if present
@return true when  delete delta dir has to be scanned.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java