@Override
  public void terminate(PointCollector collector) throws Exception {
    detector.flush();
    while (detector.hasNext()) {
      collector.putBoolean(detector.getOutTime(), detector.getOutValue());
      detector.next();
    }
  }
This function is used to detect missing anomalies.
library-udf/src/main/java/org/apache/iotdb/library/anomaly/UDTFMissDetect.java