@Override
  public long getTimePartitionWithCheck(String tsFilePath) throws PartitionViolationException {
    final long startPartitionId = TimePartitionUtils.getTimePartitionId(startTime);
    final long endPartitionId = TimePartitionUtils.getTimePartitionId(endTime);

    if (startPartitionId == endPartitionId) {
      return startPartitionId;
    }

    throw new PartitionViolationException(tsFilePath);
  }
end times. The value is Long.MIN_VALUE if it's an unsealed sequence tsfile
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndex.java