@Override
  public void validate(UDFParameterValidator validator) throws Exception {
    validator
        .validateInputSeriesDataType(0, Type.DOUBLE, Type.FLOAT, Type.INT32, Type.INT64)
        .validate(
            x ->
                ((String) x).equalsIgnoreCase("Haar")
                    || ((String) x).equalsIgnoreCase("DB2")
                    || ((String) x).equalsIgnoreCase("DB4")
                    || ((String) x).equalsIgnoreCase("DB6")
                    || ((String) x).equalsIgnoreCase("DB8")
                    || ((String) x).equalsIgnoreCase(""),
            "Method not supported, please input coefficient and leave method blank.",
            validator.getParameters().getStringOrDefault("method", ""))
        .validate(
            x -> (int) x > 0,
            "layer has to be a positive integer.",
            validator.getParameters().getIntOrDefault("layer", 1));
  }
This function calculates discrete wavelet transform of an input series. Input series must be an
integer exponent of 2. Input series is treated as sampled in equal distances.
library-udf/src/main/java/org/apache/iotdb/library/frequency/UDTFDWT.java