wsjz commented on code in PR #30198:
URL: https://github.com/apache/doris/pull/30198#discussion_r1500204483
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreClientHelper.java:
##########
@@ -584,6 +584,34 @@ private static int findNextNestedField(String
commaSplitFields) {
return commaSplitFields.length();
}
+ /**
+ * Convert doris type to hive type.
+ */
+ public static String dorisTypeToHiveType(Type dorisType) {
+ if (dorisType.equals(Type.BOOLEAN)) {
+ return "boolean";
+ } else if (dorisType.equals(Type.TINYINT)) {
+ return "tinyint";
+ } else if (dorisType.equals(Type.SMALLINT)) {
+ return "smallint";
+ } else if (dorisType.equals(Type.INT)) {
+ return "int";
+ } else if (dorisType.equals(Type.BIGINT)) {
+ return "bigint";
+ } else if (dorisType.equals(Type.DATE) ||
dorisType.equals(Type.DATEV2)) {
+ return "date";
+ } else if (dorisType.equals(Type.DATETIME) ||
dorisType.equals(Type.DATETIMEV2)) {
+ return "timestamp";
+ } else if (dorisType.equals(Type.FLOAT)) {
+ return "float";
+ } else if (dorisType.equals(Type.DOUBLE)) {
+ return "double";
+ } else if (dorisType.equals(Type.STRING)) {
+ return "string";
+ }
Review Comment:
throw exception for unsupported type
--
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]