@Override
  public void validate(UDFParameterValidator validator) throws Exception {
    validator
        .validateInputSeriesNumber(1)
        .validateInputSeriesDataType(0, Type.FLOAT, Type.DOUBLE, Type.INT32, Type.INT64)
        .validate(
            x ->
                ((String) x).equalsIgnoreCase(BATCH_COMPUTE)
                    || ((String) x).equalsIgnoreCase(STREAM_COMPUTE),
            "Parameter \"compute\" is illegal. Please use \"batch\" (for default) or \"stream\".",
            validator.getParameters().getStringOrDefault("compute", BATCH_COMPUTE))
        .validate(
            x -> ((Double) x) > 0,
            "Parameter \"sd\" is illegal. It should be larger than 0.",
            validator.getParameters().getDoubleOrDefault("sd", 1.0));
  }
This function is used to standardize the input series with z-score. Stream swap require user to
provide average and stddev, while global swap does not.
library-udf/src/main/java/org/apache/iotdb/library/dprofile/UDTFZScore.java