@Override
  public void beforeStart(UDFParameters parameters, UDTFConfigurations configurations)
      throws Exception {
    configurations.setAccessStrategy(new RowByRowAccessStrategy()).setOutputDataType(Type.DOUBLE);
    count = 0;
    sumX = 0.0;
    sumY = 0.0;
    sumXY = 0.0;
    sumXX = 0.0;
    sumYY = 0.0;
  }
This function calculates Pearson's r between two input series.
library-udf/src/main/java/org/apache/iotdb/library/dmatch/UDAFPearson.java