public boolean hasNextUnseqResource(int curIndex, boolean ascending, IDeviceID deviceID) {
    boolean res = curIndex < unseqResources.size();
    if (res && curIndex != this.curUnSeqIndex) {
      this.curUnSeqIndex = curIndex;
      this.curUnSeqOrderTime =
          unseqResources
              .get(unSeqFileOrderIndex[curIndex])
              .getOrderTimeForUnseq(deviceID, ascending);
      this.curUnSeqSatisfied = null;
    }
    return res;
  }
TsFileResources used by read job.

<p>Note: Sequences under the same data region share two lists of TsFileResources (seq and
unseq).
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/QueryDataSource.java