protected boolean checkIfNeedToDecode(
      MeasurementSchema schema, IDeviceID deviceId, PageHeader pageHeader) {
    if (pageHeader.getStatistics() == null) {
      return true;
    }
    // Decode is required if the page has data to be deleted. Otherwise, decode is not required
    if (oldModification != null) {
      modsIterator = oldModification.iterator();
      ModEntry currentDeletion;
      while (modsIterator.hasNext()) {
        currentDeletion = modsIterator.next();
        if (currentDeletion.affects(deviceId)
            && currentDeletion.affects(schema.getMeasurementName())
            && currentDeletion
                .getTimeRange()
                .contains(pageHeader.getStartTime(), pageHeader.getEndTime())) {
          return true;
        }
      }
    }
    return TimePartitionUtils.getTimePartitionId(pageHeader.getStartTime())
        != TimePartitionUtils.getTimePartitionId(pageHeader.getEndTime());
  }
If the page have no statistics or crosses multi partitions, will return true, otherwise return
false.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitByPartitionTool.java