SourabhBadhya commented on code in PR #4144:
URL: https://github.com/apache/hive/pull/4144#discussion_r1147503933
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java:
##########
@@ -1251,4 +1251,19 @@ public static String getHttpPath(String httpPath) {
}
return httpPath;
}
+
+ /**
+ * Function to get the base name of the column type.
+ * @param colType column type
+ * @return base name of the column type
+ */
+ public static String getBaseNameOfColType(String colType) {
+ // char, varchar types can have parameters such as
+ // char/varchar length. We only need the base name.
+ int idx = colType.indexOf('(');
Review Comment:
Added trims as well just for safety if we encounter such a situation.
--
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]