@Override
  public void validate(UDFParameterValidator validator) throws Exception {
    validator
        .validateInputSeriesNumber(1)
        .validate(
            x -> (long) x > 0,
            "Unknown time unit input. Supported units are ns, us, ms, s, m, h, d.",
            Util.parseTime(
                validator.getParameters().getStringOrDefault(TIME_UNIT_KEY, TIME_UNIT_S),
                validator.getParameters()));
  }
calculate the integral or the area under the curve of input series $unit$ is the time scale for
the area calculation, chosen from 1s(second, default), 1m(minute), 1h(hour), 1d(day).
library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDAFIntegral.java