public TSStatus autoCleanPartitionTable(AutoCleanPartitionTablePlan plan) {
    plan.getDatabaseTTLMap()
        .forEach(
            (database, ttl) -> {
              if (isDatabaseExisted(database) && 0 < ttl && ttl < Long.MAX_VALUE) {
                databasePartitionTables
                    .get(database)
                    .autoCleanPartitionTable(ttl, plan.getCurrentTimeSlot());
              }
            });
    return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
  }
Remove PartitionTable where the TimeSlot is expired.

@param plan Including TTL and current TimeSlot
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java