private Type inferOutputDataType(FunctionArguments arguments) {
    Set<Type> inputTypeSet = new HashSet<>();
    for (int i = 0; i < arguments.getArgumentsSize(); i++) {
      inputTypeSet.add(arguments.getDataType(i));
    }
    if (inputTypeSet.contains(Type.DOUBLE)) {
      return Type.DOUBLE;
    } else if (inputTypeSet.contains(Type.FLOAT)) {
      return Type.FLOAT;
    } else if (inputTypeSet.contains(Type.INT64)) {
      return Type.INT64;
    } else {
      return Type.INT32;
    }
  }
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