public static Filter updateFilterUsingTTL(Filter filter, long dataTTL) {
    if (dataTTL != Long.MAX_VALUE) {
      if (filter != null) {
        filter =
            FilterFactory.and(
                filter, TimeFilterApi.gtEq(CommonDateTimeUtils.currentTime() - dataTTL));
      } else {
        filter = TimeFilterApi.gtEq(CommonDateTimeUtils.currentTime() - dataTTL);
      }
    }
    return filter;
  }
@return an updated filter concerning TTL
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/SeriesScanOptions.java