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


##########
catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/converter/HiveDataTypeConverter.java:
##########
@@ -116,7 +117,17 @@ public TypeInfo fromGravitino(Type type) {
         Types.StructType structType = (Types.StructType) type;
         List<TypeInfo> typeInfos =
             Arrays.stream(structType.fields())
-                .map(t -> fromGravitino(t.type()))
+                .map(
+                    t -> {
+                      // Hive does not support comments in struct fields. This 
is no way to preserve
+                      // comments in struct fields when converting from 
Gravitino to Hive.
+                      // See: https://issues.apache.org/jira/browse/HIVE-26593
+                      Preconditions.checkArgument(
+                          t.comment() == null,
+                          "Hive does not support comments in struct fields: 
%s",
+                          t.name());
+                      return fromGravitino(t.type());
+                    })

Review Comment:
   I'm afraid this will cause confusion for the user, as the field is set 
without errors but doesn't work when loaded. Sometimes the user cannot access 
the server log, which will take time to explain.



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to