@Override
  public void beforeStart(UDFParameters parameters, UDTFConfigurations configurations)
      throws Exception {
    configurations.setAccessStrategy(new RowByRowAccessStrategy()).setOutputDataType(Type.DOUBLE);
    m = parameters.getIntOrDefault("lag", 0);
    valueArrayList.clear();
  }
This function calculates acf, and then calculates p-value of corresponding Q_LB statistics.
library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDTFQLB.java