dhruvarya-db commented on code in PR #17642:
URL: https://github.com/apache/iceberg/pull/17642#discussion_r4674459583


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4270,13 +4354,40 @@ components:
           items:
             $ref: '#/components/schemas/FieldLabels'
 
+    TableLocation:
+      type: string
+      description:
+        The table's base location, used to resolve relative paths in metadata.
+        Must be an absolute location with a URI scheme.
+
     LoadTableResult:
       description: |
         Result used when a table is successfully loaded.
 
 
-        The table metadata JSON is returned in the `metadata` field. The 
corresponding file location of table metadata should be returned in the 
`metadata-location` field, unless the metadata is not yet committed. For 
example, a create transaction may return metadata that is staged but not 
committed.
-        Clients can check whether metadata has changed by comparing metadata 
locations after the table has been created.
+        The table metadata JSON is returned in the `metadata` field.
+        The location of the table metadata file is returned in the 
`metadata-location` field when the table has one, and the table's base location 
in the `table-location` field.
+
+
+        ## Metadata location
+
+
+        The `metadata-location` field is optional.
+        It is absent when the metadata is staged but not committed, as in a 
create transaction, and when the table has no client-visible metadata location.
+
+
+        When present, clients can check whether metadata has changed by 
comparing metadata locations.
+
+
+        ## Table location
+
+
+        The `table-location` field carries the table's base location.
+        Format version 4 allows location fields in metadata to be relative and 
makes `metadata.location` optional.
+        Servers must populate `table-location` whenever `metadata.location` is 
absent.
+
+
+        When both `metadata.location` and `table-location` are present, 
`table-location` takes precedence.

Review Comment:
   @danielcweeks This used to say "When both `metadata.location` and 
`table-location` are present, `table-location` takes precedence.". I have 
changed it make `metadata.location` take precedence to make it consistent with 
the wording here: 
https://github.com/apache/iceberg/commit/36ef88722bad12973c081fd6d7bbbaf3e0b06210#diff-36347a47c3bf67ea2ef6309ea96201814032d21bb5f162dfae4045508c15588aR227
   
   > When the `location` field is present in table metadata, it is used 
directly as the table's base location. When the `location` field is not present 
(v4 and later), the table location must be provided. 
   
   



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