@Override
  public void terminate(PointCollector collector) throws Exception {
    collector.putDouble(
        0,
        (sumX3 / count - 3 * sumX1 / count * sumX2 / count + 2 * Math.pow(sumX1 / count, 3))
            / Math.pow(sumX2 / count - sumX1 / count * sumX1 / count, 1.5));
  }
This function calculates skew of input series.
library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDAFSkew.java