turboFei commented on code in PR #2878:
URL: https://github.com/apache/kyuubi/pull/2878#discussion_r1538554887
##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/JdbcColumn.java:
##########
@@ -113,208 +113,196 @@ static String columnClassName(Type hiveType,
JdbcColumnAttributes columnAttribut
return String.class.getName();
}
}
- case Types.ARRAY:
- case Types.STRUCT:
+ case ARRAY:
+ case STRUCT:
return String.class.getName();
default:
throw new SQLException("Invalid column type: " + columnType);
}
}
- static Type typeStringToHiveType(String type) throws SQLException {
- if ("string".equalsIgnoreCase(type)) {
- return Type.STRING_TYPE;
- } else if ("varchar".equalsIgnoreCase(type)) {
- return Type.VARCHAR_TYPE;
- } else if ("char".equalsIgnoreCase(type)) {
- return Type.CHAR_TYPE;
- } else if ("float".equalsIgnoreCase(type)) {
- return Type.FLOAT_TYPE;
- } else if ("double".equalsIgnoreCase(type)) {
- return Type.DOUBLE_TYPE;
- } else if ("boolean".equalsIgnoreCase(type)) {
- return Type.BOOLEAN_TYPE;
- } else if ("tinyint".equalsIgnoreCase(type)) {
- return Type.TINYINT_TYPE;
- } else if ("smallint".equalsIgnoreCase(type)) {
- return Type.SMALLINT_TYPE;
- } else if ("int".equalsIgnoreCase(type)) {
- return Type.INT_TYPE;
- } else if ("bigint".equalsIgnoreCase(type)) {
- return Type.BIGINT_TYPE;
- } else if ("date".equalsIgnoreCase(type)) {
- return Type.DATE_TYPE;
- } else if ("timestamp".equalsIgnoreCase(type)) {
- return Type.TIMESTAMP_TYPE;
- } else if
(serdeConstants.TIMESTAMPLOCALTZ_TYPE_NAME.equalsIgnoreCase(type)) {
- return Type.TIMESTAMPLOCALTZ_TYPE;
- } else if ("interval_year_month".equalsIgnoreCase(type)) {
- return Type.INTERVAL_YEAR_MONTH_TYPE;
- } else if ("interval_day_time".equalsIgnoreCase(type)) {
- return Type.INTERVAL_DAY_TIME_TYPE;
- } else if ("decimal".equalsIgnoreCase(type)) {
- return Type.DECIMAL_TYPE;
- } else if ("binary".equalsIgnoreCase(type)) {
- return Type.BINARY_TYPE;
- } else if ("map".equalsIgnoreCase(type)) {
- return Type.MAP_TYPE;
- } else if ("array".equalsIgnoreCase(type)) {
- return Type.ARRAY_TYPE;
- } else if ("struct".equalsIgnoreCase(type)) {
- return Type.STRUCT_TYPE;
- } else if ("uniontype".equalsIgnoreCase(type)) {
- return Type.UNION_TYPE;
Review Comment:
@pan3793 It is missed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]