public static UDFType of(Model model, FunctionType type, boolean available) {
    if (model == Model.TREE) {
      return available ? TREE_AVAILABLE : TREE_UNAVAILABLE;
    } else {
      switch (type) {
        case SCALAR:
          return available ? TABLE_AVAILABLE_SCALAR : TABLE_UNAVAILABLE_SCALAR;
        case AGGREGATE:
          return available ? TABLE_AVAILABLE_AGGREGATE : TABLE_UNAVAILABLE_AGGREGATE;
        case TABLE:
          return available ? TABLE_AVAILABLE_TABLE : TABLE_UNAVAILABLE_TABLE;
        default:
          throw new IllegalArgumentException("Unknown FunctionType: " + type);
      }
    }
  }
For Tree Model: none. For Table Model: scalar, aggregate, table.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFType.java