public static Type valueOf(byte type) {
    for (Type t : Type.values()) {
      if (t.dataType == type) {
        return t;
      }
    }
    throw new IllegalArgumentException("Unsupported type: " + type);
  }
A substitution class for TsDataType in UDF APIs.
iotdb-api/udf-api/src/main/java/org/apache/iotdb/udf/api/type/Type.java