@Override
  public ScalarFunctionAnalysis analyze(FunctionArguments arguments)
      throws UDFArgumentNotValidException {
    if (arguments.getArgumentsSize() < 1) {
      throw new UDFArgumentNotValidException("At least one parameter is required.");
    }
    for (int i = 0; i < arguments.getArgumentsSize(); i++) {
      if (arguments.getDataType(i) != Type.INT32
          && arguments.getDataType(i) != Type.INT64
          && arguments.getDataType(i) != Type.FLOAT
          && arguments.getDataType(i) != Type.DOUBLE) {
        throw new UDFArgumentNotValidException(
            "Only support inputs of INT32,INT64,DOUBLE,FLOAT type.");
      }
    }
    return new ScalarFunctionAnalysis.Builder()
        .outputDataType(inferOutputDataType(arguments))
        .build();
  }
Calculate the sum of all arguments. Only support inputs of INT32,INT64,DOUBLE,FLOAT type.
integration-test/src/main/java/org/apache/iotdb/db/query/udf/example/relational/AllSum.java