c-thiel commented on code in PR #12584:
URL: https://github.com/apache/iceberg/pull/12584#discussion_r4719317046


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4065,6 +4135,90 @@ components:
       allOf:
         - $ref: '#/components/schemas/ScanTasks'
 
+    QueryEventsRequest:
+      type: object
+      properties:
+        continuation-token:
+          type: string
+          description: >
+            A continuation token returned by a previous response. Clients 
should treat the
+            token as an opaque value and pass it unmodified. If not provided, 
events are
+            returned from the beginning of the event log subject to other 
filters.
+        page-size:
+          type: integer
+          format: int32
+          minimum: 1
+          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.
+        since-timestamp-ms:
+          type: integer
+          format: int64
+          description: >
+            Optional starting timestamp (seek-to-timestamp) for the initial 
request. The client
+            consumes events that occurred at or after the specified timestamp, 
in milliseconds
+            (inclusive), without iterating the full history. If not provided, 
no filtering based
+            on timestamp values is applied.
+            This applies only to the initial request. When a 
`continuation-token` is provided, it
+            determines the resume position and `since-timestamp-ms` is ignored.
+        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 catalog object name. Each entry is a 
`CatalogObjectIdentifier`:
+            an array of name levels - e.g. `["a","b","t1"]` is the table 
`a.b.t1`. The filter
+            matches an event when the entry's levels equal the event object's 
path, or form a
+            leading prefix of it. Comparison is level-by-level: each array 
element is one path
+            segment, so `["acc"]` is a prefix of `["acc","tax"]` but does not 
match
+            `["accounting"]`.
+
+            Matching is by name only, independent of object kind. Tables and 
views are leaves
+            of the name tree, so a leaf entry matches a single object - 
`["a","b","t1"]`
+            matches only the table or view `a.b.t1`. A namespace entry expands 
recursively:
+            `["a","b"]` matches the namespace object `a.b` itself plus every 
descendant
+            (`a.b.t1`, `a.b.v1`, sub-namespace `a.b.c`, and every object under 
it). It does
+            not match the sibling namespace `a.c`.
+
+            If a path exists as more than one kind (e.g. a namespace and a 
same-named table),
+            the filter matches events for all of them; combine with 
`object-types` to narrow.

Review Comment:
   Yes, that's an accepted trade-off: identifiers aren't unique across object 
kinds, so a name entry matches every object at that path. Steven and I went 
through this in the catalog-objects-by-uuid thread. You're right that 
object-types isn't tied to an entry, but it still narrows a single-kind query, 
and a mixed-kind query can be split into one query per kind. Each event's 
operation-type also names its kind, so extra events are easy to discard. There 
are no function events yet; a per-entry kind could be added later as a new 
filter field.



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