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


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2286,6 +2331,31 @@ components:
       schema:
         type: string
 
+    if-none-match:
+      name: If-None-Match
+      in: header
+      description:
+        An optional header that allows the server to return 304 (Not Modified) 
if the metadata
+        is current. The content is the value of the ETag received in a 
CreateTableResponse,
+        LoadTableResponse or CommitTableResponse.
+      required: false
+      schema:
+        type: string
+
+    snapshots:
+      name: snapshots
+      in: query
+      description:
+        The snapshots to return in the body of the metadata via the 
`snapshots` field. Setting
+        the value to `all` would return the full set of snapshots currently 
valid for the table.
+        Setting the value to `refs` would load all snapshots referenced by 
branches or tags.
+
+        Default if no param is provided is `all`.

Review Comment:
   Done. The shared snapshots param doesn't mention a default anymore, each 
load endpoint says it defaults to `all`. That way v2 can switch to refs later 
without touching v1.



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1361,6 +1354,58 @@ paths:
         5XX:
           $ref: '#/components/responses/ServerErrorResponse'
 
+  /v2/{prefix}/namespaces/{namespace}/tables/{table}:
+    parameters:
+      - $ref: '#/components/parameters/prefix'
+      - $ref: '#/components/parameters/namespace'
+      - $ref: '#/components/parameters/table'
+
+    get:
+      tags:
+        - Catalog API
+      summary: Load a table from the catalog
+      operationId: loadTableV2
+      description:
+        Load a table from the catalog.
+
+
+        Behaves exactly like the v1 `loadTable` endpoint, except that it may 
also return format version 4 tables.
+        Clients that support format version 4 should load tables through this 
endpoint.

Review Comment:
   Fair, removed the "just like v1" part. It now only says it can return tables 
at any format version including v4.



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -2286,6 +2331,31 @@ components:
       schema:
         type: string
 
+    if-none-match:
+      name: If-None-Match
+      in: header
+      description:
+        An optional header that allows the server to return 304 (Not Modified) 
if the metadata
+        is current. The content is the value of the ETag received in a 
CreateTableResponse,
+        LoadTableResponse or CommitTableResponse.

Review Comment:
   Done



##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3036,7 +3115,14 @@ components:
           format: int64
         manifest-list:
           type: string
-          description: Location of the snapshot's manifest list file
+          description:
+            Location of the snapshot's manifest list file.
+            Used for format versions 1-3 and must be absent for format version 
4, which uses `root-manifest` instead.

Review Comment:
   Good catch, I hadn't thought about upgraded tables. I dropped the format 
version rules from both manifest-list and `root-manifest`. The oneOf still 
makes sure each snapshot has exactly one of them, and the table spec already 
covers which one is used.



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