@Override
  public void transform(RowWindow rowWindow, PointCollector collector) throws Exception {
    try {
      if (rowWindow.windowSize() > TimeSeriesQuality.WINDOW_SIZE) {
        TimeSeriesQuality tsq = new TimeSeriesQuality(rowWindow.getRowIterator());
        tsq.timeDetect();
        collector.putDouble(rowWindow.getRow(0).getTime(), tsq.getConsistency());
      }
    } catch (IOException | NoNumberException ex) {
      Logger.getLogger(UDTFCompleteness.class.getName()).log(Level.SEVERE, null, ex);
    }
  }
This function calculates consistency of input series.
library-udf/src/main/java/org/apache/iotdb/library/dquality/UDTFConsistency.java