@Override
  public void beforeStart(UDFParameters parameters, UDTFConfigurations configurations)
      throws Exception {
    configurations.setAccessStrategy(new RowByRowAccessStrategy()).setOutputDataType(Type.DOUBLE);
    String result = parameters.getStringOrDefault("result", "abs");
    this.compressed = parameters.hasAttribute(COMPRESS_PARAM);
    double compressRate = parameters.getDoubleOrDefault(COMPRESS_PARAM, 1);
    this.fftutil = new FFTUtil(result, compressRate);
  }
This function does Fast Fourier Transform for input series.
library-udf/src/main/java/org/apache/iotdb/library/frequency/UDTFFFT.java