rdblue commented on code in PR #7992:
URL: https://github.com/apache/iceberg/pull/7992#discussion_r1274205352


##########
format/view-spec.md:
##########
@@ -75,13 +77,17 @@ Notes:
 
 Each version in `versions` is a struct with the following fields:
 
-| Requirement | Field name        | Description                                
                              |
-|-------------|-------------------|--------------------------------------------------------------------------|
-| _required_  | `version-id`      | ID for the version                         
                              |
-| _required_  | `schema-id`       | ID of the schema for the view version      
                              |
-| _required_  | `timestamp-ms`    | Timestamp when the version was created (ms 
from epoch)                   |
-| _required_  | `summary`         | A string to string map of [summary 
metadata](#summary) about the version |
-| _required_  | `representations` | A list of 
[representations](#representations) for the view definition    |
+| Requirement | Field name          | Description                              
                                     |
+|-------------|---------------------|-------------------------------------------------------------------------------|
+| _required_  | `version-id`        | ID for the version                       
                                     |
+| _required_  | `schema-id`         | ID of the schema for the view version    
                                     |
+| _required_  | `timestamp-ms`      | Timestamp when the version was created 
(ms from epoch)                        |
+| _required_  | `summary`           | A string to string map of [summary 
metadata](#summary) about the version      |
+| _required_  | `representations`   | A list of 
[representations](#representations) for the view definition         |
+| _optional_  | `default-catalog`   | Catalog name to use when a reference in 
the SELECT does not contain a catalog |
+| _optional_  | `default-namespace` | Namespace to use when a reference in the 
SELECT is a single identifier        |
+
+When writing a new view version, all the information from the previous view 
version is replaced, meaning that `representations` / `default-catalog` / 
`default-namespace` / `summary` are not carried over.

Review Comment:
   This is also incorrect for the spec.
   
   There is nothing preventing us from creating an operation that does exactly 
this carry over, as long as it is the user's intent. For example:
   
   ```sql
   ALTER VIEW v ADD REPRESENTATION spark AS
   SELECT * FROM foo
   ```
   
   This SQL clearly **adds** to the existing representations. It isn't correct 
or incorrect to do that. It is simply the behavior that a SQL operation could 
have. The spec allows all these things.



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