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


##########
api/src/main/java/org/apache/iceberg/view/ViewVersion.java:
##########
@@ -65,5 +65,8 @@ public interface ViewVersion {
    *
    * @return the string operation which produced the view version
    */
-  String operation();
+  @Value.Derived
+  default String operation() {
+    return summary().get("operation");
+  }
 }

Review Comment:
   Nice, Derived is way cleaner. We don't need any of the special  parsing 
logic for operation and derived also prevents manually setting the operation 
field, so there is no ambiguity in which is the real "operation"



##########
core/src/main/java/org/apache/iceberg/view/SQLViewRepresentationParser.java:
##########
@@ -35,7 +35,7 @@ class SQLViewRepresentationParser {
   private static final String DEFAULT_CATALOG = "default-catalog";
   private static final String DEFAULT_NAMESPACE = "default-namespace";
   private static final String FIELD_ALIASES = "field-aliases";
-  private static final String FIELD_COMMENTS = "field-comments";
+  private static final String FIELD_DOCS = "field-docs";

Review Comment:
   Replied 
[here](https://github.com/apache/iceberg/pull/7416#discussion_r1175521596) as 
well, I think we should change the spec to be field-comments instead because 
most mechanisms for creating/altering the view (such as SQL) will call this a 
comment. Let me know your thoughts on this though



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