public static TSDataType getPredictedDataType(Object value, boolean inferType) {
    if (value == null) {
      return null;
    }
    if (value instanceof Boolean) {
      return TSDataType.BOOLEAN;
    } else if (value instanceof Integer) {
      return TSDataType.INT32;
    } else if (value instanceof Long) {
      return TSDataType.INT64;
    } else if (value instanceof Float) {
      return TSDataType.FLOAT;
    } else if (value instanceof Double) {
      return TSDataType.DOUBLE;
    } else if (inferType) {
      String strValue = value.toString();
      if (isBoolean(strValue)) {
        return CONF.getBooleanStringInferType();
      } else if (isNumber(strValue)) {
        if (isLong(StringUtils.trim(strValue))) {
          return CONF.getIntegerStringInferType();
        } else {
          return CONF.getFloatingStringInferType();
        }
      } else if ("null".equals(strValue) || "NULL".equals(strValue)) {
        return null;
        // "NaN" is returned if the NaN Literal is given in Parser
      } else if ("NaN".equals(strValue)) {
        return CONF.getNanStringInferType();
      } else if (isBlob(strValue)) {
        return TSDataType.BLOB;
      } else {
        return TSDataType.TEXT;
      }
    }

    return TSDataType.TEXT;
  }
Get predicted DataType of the given value
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java