predator4ann commented on code in PR #6657:
URL: https://github.com/apache/gravitino/pull/6657#discussion_r2206240591


##########
catalogs/catalog-jdbc-mysql/src/main/java/org/apache/gravitino/catalog/mysql/converter/MysqlTypeConverter.java:
##########
@@ -72,15 +73,21 @@ public Type toGravitino(JdbcTypeBean typeBean) {
       case DATE:
         return Types.DateType.get();
       case TIME:
-        return Types.TimeType.get();
+        return Optional.ofNullable(typeBean.getDatetimePrecision())
+            .map(Types.TimeType::of)
+            .orElseGet(Types.TimeType::get);
         // MySQL converts TIMESTAMP values from the current time zone to UTC 
for storage, and back
         // from UTC to the current time zone for retrieval. (This does not 
occur for other types
         // such as DATETIME.) see more details:
         // https://dev.mysql.com/doc/refman/8.0/en/datetime.html
       case TIMESTAMP:
-        return Types.TimestampType.withTimeZone();
+        return Optional.ofNullable(typeBean.getDatetimePrecision())

Review Comment:
   A new scenario has been added where, when the mysql jdbc driver version does 
not support calculating precision, null will be returned here 



-- 
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]

Reply via email to