jackye1995 commented on code in PR #6598: URL: https://github.com/apache/iceberg/pull/6598#discussion_r1072999500
########## 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: I made the suggestion since I see some other enum like classes are also implemented directly as strings, such as `DataOperations`, and it seems to simplify the code a bit. But if there is a specific reason for using enum we can stick to that. -- 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