public void cleanWindow(PointCollector collector) throws IOException {
    if (window.isEmpty()) {
      return;
    }
    first = last = -gap;
    for (Pair<Long, Boolean> p : window) {
      process(p.getLeft(), p.getRight(), collector);
    }
  }
clear data points in the window.
library-udf/src/main/java/org/apache/iotdb/library/series/util/ConsecutiveUtil.java