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; +@Value.Immutable 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org