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


##########
common/src/main/java/org/apache/gravitino/semantic/OssieDocumentConverter.java:
##########
@@ -507,18 +513,30 @@ private static DataType readDataType(ObjectNode object, 
String path) {
   }
 
   private static String dataTypeName(DataType dataType) {
-    return switch (dataType) {
-      case STRING -> "String";
-      case INTEGER -> "Integer";
-      case DECIMAL -> "Decimal";
-      case FLOAT -> "Float";
-      case BOOLEAN -> "Boolean";
-      case DATE -> "Date";
-      case TIME -> "Time";
-      case DATE_TIME -> "DateTime";
-      case DATE_TIME_TZ -> "DateTimeTz";
-      case OPAQUE -> "Opaque";
-    };
+    switch (dataType) {
+      case STRING:
+        return "String";
+      case INTEGER:
+        return "Integer";
+      case DECIMAL:
+        return "Decimal";
+      case FLOAT:
+        return "Float";
+      case BOOLEAN:
+        return "Boolean";
+      case DATE:
+        return "Date";
+      case TIME:
+        return "Time";
+      case DATE_TIME:
+        return "DateTime";
+      case DATE_TIME_TZ:
+        return "DateTimeTz";
+      case OPAQUE:
+        return "Opaque";
+      default:

Review Comment:
   Already covered by 
[`testAllDataTypesRoundTripWithoutDTOs`](https://github.com/apache/gravitino/blob/8b921e19be124fb25496c8a650a71e1a744284ab/common/src/test/java/org/apache/gravitino/semantic/TestOssieDocumentConverter.java#L563):
 it iterates over `DataType.values()`, exports fields and metrics in both JSON 
and YAML, and checks their serialized names and round trip. Adding an enum 
value fails the expected-name count check; a missing mapping also fails during 
export.



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