stevenzwu commented on code in PR #12584:
URL: https://github.com/apache/iceberg/pull/12584#discussion_r3190712447


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3545,6 +3652,69 @@ components:
       allOf:
         - $ref: '#/components/schemas/ScanTasks'
 
+    QueryEventsRequest:
+      type: object
+      properties:
+        continuation-token:
+          type: string
+          description: >
+            A continuation token to resume fetching events from a previous 
request.
+            If not provided, events are fetched from the beginning of the 
event log
+            subject to other filters.
+        page-size:
+          type: integer
+          format: int32
+          description: >
+            The maximum number of events to return in a single response.
+            If not provided, the server may choose a default page size.
+            Servers may return less results than requested for various 
reasons, such as
+            server side limits, payload size or processing time.
+        after-timestamp-ms:
+          type: integer
+          format: int64
+          description: >
+            The (server) timestamp in milliseconds to start consuming events 
from (inclusive).
+            If not provided, no filtering based on timestamp values.
+        operation-types:
+          type: array
+          items:
+            $ref: "#/components/schemas/OperationType"
+          description: >
+            Filter events by the type of operation.
+            If not provided, all types are returned.
+        catalog-objects-by-name:
+          type: array
+          items:
+            $ref: "#/components/schemas/CatalogObjectIdentifier"
+          description: >
+            Filter events by the list of catalog objects referenced by name 
(namespaces, tables, views).
+            If not provided, events for all objects must be returned subject 
to other filters.
+            For specified namespaces, events for the namespaces and all 
containing objects
+            (namespaces, tables, views) must be returned (recursively).
+        catalog-objects-by-id:
+          type: array
+          items:
+            $ref: "#/components/schemas/CatalogObjectUuid"
+          description: >
+            Filter events by the list of catalog objects referenced by UUID 
(tables, views).
+        object-types:

Review Comment:
   nm. split into object and operation types would complicate the discriminator 
field. OpenAPI only allows a single string for discriminator and we can't 
natively discriminate on a tuple. nested discrimination seems more complex.
   
   But we can still add the `object-type: table` (etc.) as a const field on 
each subtype. Wire-level symmetry with the request filter is achieved, and 
CustomOperation becomes self-describing because it carries an explicit 
object-type. Cost: the value is technically derivable from operation-type for 
the standard ops, so it's  "redundant" — but for custom ops it's load-bearing, 
and for clients it's a stable field they don't have to parse.



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