wombatu-kun commented on code in PR #17137:
URL: https://github.com/apache/iceberg/pull/17137#discussion_r3556011641


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3120,6 +3120,13 @@ components:
     AddSchemaUpdate:
       allOf:
         - $ref: '#/components/schemas/BaseUpdate'
+      description:
+        Adds a schema to the table. The field IDs in `schema` are assigned by 
the client. The client

Review Comment:
   `AddSchemaUpdate` is referenced by `ViewUpdate` (line 3490) as well as 
`TableUpdate` (line 3464), and this description becomes the docstring of the 
single generated model (`open-api/rest-catalog-open-api.py:1518`). Views have 
no data files, partition specs, or sort orders, so both the summary ("Adds a 
schema to the table") and the rationale that follows exclude the view commit 
path, even though that path emits this exact update: 
`ViewMetadata.Builder.addSchemaInternal` 
(`core/src/main/java/org/apache/iceberg/view/ViewMetadata.java:385`), applied 
server-side by `MetadataUpdate.AddSchema.applyTo(ViewMetadata.Builder)` 
(`core/src/main/java/org/apache/iceberg/MetadataUpdate.java:112`). This gets 
sharper if `SHOULD` becomes `MUST` as @rambleraptor and @rdblue suggest below, 
since the MUST would then bind view commits on a justification that cannot hold 
for them.
   
   `AssignUUIDUpdate`, the other update shared by `TableUpdate` and 
`ViewUpdate`, handles this by naming both: "Assigning a UUID to a table/view 
..." (line 3094). Suggest opening with "Adds a schema to the table or view" and 
scoping the data-file, partition-spec, and sort-order rationale explicitly to 
tables.



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