public static boolean canMerge(ModEntry left, ModEntry right) {
    if (!Objects.equals(left.getClass(), right.getClass())
        || !canMerge(left.getTimeRange(), right.getTimeRange())) {
      return false;
    }

    if (left instanceof TreeDeletionEntry) {
      return Objects.equals(
          ((TreeDeletionEntry) left).getPathPattern(),
          ((TreeDeletionEntry) right).getPathPattern());
    } else if (left instanceof TableDeletionEntry) {
      return Objects.equals(
          ((TableDeletionEntry) left).getPredicate(), ((TableDeletionEntry) right).getPredicate());
    }
    return false;
  }
construct a deletion list from a memtable.

@param memTable memtable
@param timeLowerBound time watermark
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ModificationUtils.java