@Override
  public void transform(RowWindow rowWindow, PointCollector collector) throws Exception {
    ValueFill vf;
    if ("previous".equalsIgnoreCase(method)) {
      vf = new PreviousFill(rowWindow.getRowIterator());
    } else if ("linear".equalsIgnoreCase(method)) {
      vf = new LinearFill(rowWindow.getRowIterator());
    } else if ("mean".equalsIgnoreCase(method)) {
      vf = new MeanFill(rowWindow.getRowIterator());
    } else if ("ar".equalsIgnoreCase(method)) {
      vf = new ARFill(rowWindow.getRowIterator());
    } else if ("screen".equalsIgnoreCase(method)) {
      vf = new ScreenFill(rowWindow.getRowIterator());
    } else if ("likelihood".equalsIgnoreCase(method)) {
      vf = new LikelihoodFill(rowWindow.getRowIterator());
    } else {
      throw new UDFException("Illegal method");
    }
    vf.fill();
    double[] repaired = vf.getFilled();
    long[] time = vf.getTime();
    switch (rowWindow.getDataType(0)) {
      case DOUBLE:
        for (int i = 0; i < time.length; i++) {
          collector.putDouble(time[i], repaired[i]);
        }
        break;
      case FLOAT:
        for (int i = 0; i < time.length; i++) {
          collector.putFloat(time[i], (float) repaired[i]);
        }
        break;
      case INT32:
        for (int i = 0; i < time.length; i++) {
          collector.putInt(time[i], (int) Math.round(repaired[i]));
        }
        break;
      case INT64:
        for (int i = 0; i < time.length; i++) {
          collector.putLong(time[i], Math.round(repaired[i]));
        }
        break;
      case TEXT:
      case STRING:
      case BOOLEAN:
      case BLOB:
      case TIMESTAMP:
      case DATE:
      default:
        throw new UDFException("");
    }
  }
This function is used to interpolate time series.
library-udf/src/main/java/org/apache/iotdb/library/drepair/UDTFValueFill.java