rahil-c commented on code in PR #9660:
URL: https://github.com/apache/iceberg/pull/9660#discussion_r1483788053


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -212,6 +212,34 @@ paths:
           schema:
             type: string
           example: "accounting%1Ftax"
+        - name: pageToken
+          in: query
+          description:
+            Allows clients to make use of pagination by signaling to the 
service that they would
+            prefer requests to be paginated to a “reasonable” number of 
results.
+            
+            New Clients always start the request by sending a required empty 
“pageToken” e.g. GET /tables?continuationToken=””
+            Servers supporting pagination would recognize pagination is 
requested due to the presence of the pageToken
+            and honor the contracts specified above by returning a non-empty 
continuation token
+            if there are more results available, or an empty token or missing 
field indicating no more results.
+            Servers that are non-pagination aware will ignore the token and 
return all results as they previously did.
+            
+            Old clients should not be specifying the new parameters
+            For servers that support pagination, they would notice the lack of 
“continuationToken”

Review Comment:
   Wanted to further expand on this with a table shows the cases in how the 
`pageToken` will work for both old clients, new clients, old services and new 
services.
   cc @jackye1995 @danielcweeks @rdblue 
   
   |                     | Old services which does not support pagination | New 
Service which does not support pagination | New Service which only supports 
pagination | New Service (which supports both pagination and non pagination) |
   | ----------- | ----------- |--------| ------- | -------- |
   |Old Client (which does not send pageToken)  | current behavior return full 
results      |  current behavior return full result        | Will be expecting 
pageToken, and therefore will have to throw Unsupported Operation. In this case 
expectation is that client will have to upgrade to use pageToken.   | Either 
return all results or if taking too long throw Unsupported(saying must use 
pagination and upgrade to use the new client to send pageToken) |
   |New Client (which sends pageToken) | would ingore pageToken and  default to 
current behavior return full result   |would ignore pageToken and  default to 
current behavior return full result   | return results in paginated way      | 
return results in paginated way  |
   



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