public long getOrderTimeForSeq(IDeviceID deviceId, boolean ascending) {
    if (timeIndex instanceof ArrayDeviceTimeIndex) {
      return ascending
          ? timeIndex.getStartTime(deviceId).orElse(Long.MIN_VALUE)
          : timeIndex.getEndTime(deviceId).orElse(Long.MAX_VALUE);
    } else {
      return ascending ? Long.MIN_VALUE : Long.MAX_VALUE;
    }
  }
open file's end time is Long.MIN_VALUE
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java