private boolean checkSorted(Tablet tablet) {
    for (int i = 1; i < tablet.getRowSize(); i++) {
      if (tablet.getTimestamp(i) < tablet.getTimestamp(i - 1)) {
        return false;
      }
    }
    return true;
  }
check whether the batch has been sorted

@return whether the batch has been sorted
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java