mchades commented on code in PR #7103:
URL: https://github.com/apache/gravitino/pull/7103#discussion_r2065579762


##########
catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/converter/HiveDataTypeConverter.java:
##########
@@ -87,7 +87,15 @@ public TypeInfo fromGravitino(Type type) {
       case DATE:
         return getPrimitiveTypeInfo(DATE_TYPE_NAME);
       case TIMESTAMP:
-        return getPrimitiveTypeInfo(TIMESTAMP_TYPE_NAME);
+        if (type instanceof Types.TimestampType) {
+          Types.TimestampType tsType = (Types.TimestampType) type;
+          if (tsType.hasTimeZone()) {
+            throw new UnsupportedOperationException(
+                "Unsupported conversion: Hive does not support TIMESTAMP WITH 
TIMEZONE type.");

Review Comment:
   could you plz attach the link 
https://hive.apache.org/docs/latest/languagemanual-types_27838462/#timestamps
   to the code comment to declare the basis for this behavior



##########
catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/converter/HiveDataTypeConverter.java:
##########
@@ -87,7 +87,15 @@ public TypeInfo fromGravitino(Type type) {
       case DATE:
         return getPrimitiveTypeInfo(DATE_TYPE_NAME);
       case TIMESTAMP:
-        return getPrimitiveTypeInfo(TIMESTAMP_TYPE_NAME);
+        if (type instanceof Types.TimestampType) {
+          Types.TimestampType tsType = (Types.TimestampType) type;
+          if (tsType.hasTimeZone()) {
+            throw new UnsupportedOperationException(
+                "Unsupported conversion: Hive does not support TIMESTAMP WITH 
TIMEZONE type.");

Review Comment:
   BTW, we can remind users to use the TIMESTAMP WITHOUT TIMEZONE type instead 
in error messages.



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