public void autoCleanPartitionTable(long TTL, TTimePartitionSlot currentTimeSlot) {
    long[] removedTimePartitionSlots =
        dataPartitionTable.autoCleanPartitionTable(TTL, currentTimeSlot).stream()
            .map(TTimePartitionSlot::getStartTime)
            .collect(Collectors.toList())
            .stream()
            .mapToLong(Long::longValue)
            .toArray();
    if (removedTimePartitionSlots.length > 0) {
      LOGGER.info(
          "[PartitionTableCleaner] The TimePartitions: {} are removed from Database: {}",
          removedTimePartitionSlots,
          databaseName);
    }
  }
Remove PartitionTable where the TimeSlot is expired.

@param TTL The Time To Live
@param currentTimeSlot The current TimeSlot
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java