amogh-jahagirdar commented on code in PR #6598:
URL: https://github.com/apache/iceberg/pull/6598#discussion_r1081672308


##########
api/src/main/java/org/apache/iceberg/view/ViewRepresentation.java:
##########
@@ -18,21 +18,16 @@
  */
 package org.apache.iceberg.view;
 
-import java.util.Locale;
+import org.immutables.value.Value;
 
[email protected]
 public interface ViewRepresentation {
 
-  enum Type {
-    SQL;
+  class Type {
+    private Type() {}
 
-    public static Type fromString(String typeName) {
-      return valueOf(typeName.toUpperCase(Locale.ENGLISH));
-    }
-
-    public String typeName() {
-      return name().toLowerCase(Locale.ENGLISH);
-    }
+    public static final String SQL = "sql";

Review Comment:
   Yeah it seems like an established pattern elsewhere just to use a constant 
string and it simplifies the parsing logic a bit but I'm happy to revert back 
to enum if there's other advantages. Let me know your thoughts @rdblue  



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

Reply via email to