Skip to content

API, Core: Implement events endpoint#15990

Draft
stevenzwu wants to merge 7 commits intoapache:mainfrom
stevenzwu:events-endpoint-impl
Draft

API, Core: Implement events endpoint#15990
stevenzwu wants to merge 7 commits intoapache:mainfrom
stevenzwu:events-endpoint-impl

Conversation

@stevenzwu
Copy link
Copy Markdown
Contributor

@stevenzwu stevenzwu commented Apr 15, 2026

Implement the events endpoint proposal (see spec PR #12584). This would replace PR #14142 as the original author couldn't work on it anymore.

This is in draft status as we will have some open questions on the spec itself. e.g.

As the spec adjusts, so does the implementation. Current purpose is to demonstrate what the implementation would look like. This will be broken down to smaller PRs for the formal review process.

Add request and response objects for the /events endpoint, including
CatalogObjectIdentifier, CatalogObjectType, CatalogObjectUuid in the
API module, and Event, Operation types, parsers, QueryEventsRequest,
QueryEventsResponse with serialization support in core.

Based on apache#14142

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
…tern

Replace 14 individual operation files and 14 individual parser files with
a single CatalogOperation interface (with inner classes) and a single
CatalogOperationParser class (with private writeXxx/readXxx methods),
following the established MetadataUpdate/MetadataUpdateParser pattern.
Also fixes CustomOperation serialization to properly include properties.

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Use a namespace-and-name CatalogObjectIdentifier so event query filters follow the proposed REST shape and can reuse the existing identifier parsing pattern. Also move EventParser next to Event, rename the response continuation token field, and add round-trip parser coverage.

Made-with: Cursor
Model: GPT-5.4
Reject empty namespace levels in CatalogObjectIdentifier and enforce non-negative event query bounds so invalid filters are rejected consistently during request construction and parsing.

Made-with: Cursor
Model: GPT-5.4
- Add @nullable to QueryEventsResponse.continuationToken and handle
  null in parser serialization/deserialization
- Use primitive int/long for required Event fields instead of boxed types
- Fix RESTSerializers naming: DeSerializer -> Deserializer,
  EventsResponse -> QueryEventsResponse
- Standardize toJsonPretty to toJson(obj, boolean) across all parsers
- Add Preconditions constructor validation to all CatalogOperation
  inner classes
- Use consistent Preconditions.checkArgument in CatalogObjectUuid
  constructor with null check for type parameter
- Pass ImmutableList.of() instead of null for optional requirements in
  CatalogOperationParser
- Simplify QueryEventsResponseParser.fromJson builder to chained
  expression
- Add .hasMessage() assertions to TestCatalogObjectUuidParser

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Merge 14 individual TestXxxOperationParser files into a single
TestCatalogOperationParser class in the rest/events/ package,
mirroring the TestMetadataUpdateParser pattern. All test coverage
is preserved with deduplicated null/error handling tests.

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Move CatalogOperation and OperationType from rest.events.operations
to rest.events, eliminating the unnecessary subpackage nesting.

Made-with: Cursor
Model: claude-4.6-opus-high-thinking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant