private void deDuplicateTimestamps(final int startIndex, final int endIndex) {
    final long[] timestamps = tablet.getTimestamps();
    long lastTime = timestamps[index[startIndex]];
    for (int i = startIndex + 1; i < endIndex; i++) {
      if (lastTime != (lastTime = timestamps[index[i]])) {
        deDuplicatedIndex[deDuplicatedSize++] = i - 1;
      }
    }
    deDuplicatedIndex[deDuplicatedSize++] = endIndex - 1;
  }
For the sorting and deduplication needs of the table model tablet, it is done according to the
{@link IDeviceID}. For sorting, it is necessary to sort the {@link IDeviceID} first, and then
sort by time. Deduplication is to remove the same timestamp in the same {@link IDeviceID}, and
the same timestamp in different {@link IDeviceID} will not be processed.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/util/sorter/PipeTableModelTabletEventSorter.java