Skip to content

Core: Implement IRC Events endpoint request and response objects#16296

Open
visit2rahul wants to merge 3 commits into
apache:mainfrom
visit2rahul:feature/irc-events-endpoint-objects
Open

Core: Implement IRC Events endpoint request and response objects#16296
visit2rahul wants to merge 3 commits into
apache:mainfrom
visit2rahul:feature/irc-events-endpoint-objects

Conversation

@visit2rahul
Copy link
Copy Markdown

Closes #13580

Summary

Implements the core request, response, and model objects for the IRC Events endpoint
as defined in the REST Catalog specification (PR #12584).

Request / Response

  • QueryEventsRequest — all filter fields (continuation token, page size, timestamp,
    operation types, catalog objects by name/ID, object types, custom filters)
  • QueryEventsResponse — pagination token, highest processed timestamp, event list

Event Model

  • Event — event ID, request ID, request event count, timestamp, actor, and
    polymorphic operation
  • CatalogOperation — base interface with operationType() discriminator
  • CatalogOperationParser — polymorphic serialization/deserialization with
    forward compatibility for unknown operation types

All 13 Operation Types

  • Namespace: CreateNamespaceOperation, DropNamespaceOperation,
    UpdateNamespacePropertiesOperation
  • Table: CreateTableOperation, RegisterTableOperation, DropTableOperation,
    UpdateTableOperation, RenameTableOperation
  • View: CreateViewOperation, DropViewOperation, UpdateViewOperation,
    RenameViewOperation
  • Extension: CustomOperation (for catalog-specific x- prefixed operations)

Serialization

  • Parser classes for request, response, and events using JsonGenerator/JsonNode
  • Reuses existing TableIdentifierParser, MetadataUpdateParser, and
    UpdateRequirementParser
  • Jackson serializer/deserializer registration in RESTSerializers

Test Plan

  • Round-trip serialization tests for all 13 operation types
  • Round-trip tests for QueryEventsRequest (empty, partial, all fields)
  • Round-trip tests for QueryEventsResponse (with events, empty)
  • Forward compatibility test — unknown operation types deserialize gracefully
  • Null/error input handling tests
  • ./gradlew :iceberg-core:compileJava passes
  • ./gradlew :iceberg-core:test passes (17 new tests)

…che#13580)

Implement QueryEventsRequest, QueryEventsResponse, Event, and all
operation types for the IRC Events endpoint as defined in the REST
Catalog specification (PR apache#12584).

This includes:
- QueryEventsRequest with all filter fields (continuation token,
  page size, timestamp, operation types, catalog objects, etc.)
- QueryEventsResponse with pagination and event list
- Event model with actor, timestamp, and polymorphic operation
- All 13 operation types: create/drop/update/rename for tables,
  views, and namespaces, plus custom operations
- CatalogOperationParser with discriminated union deserialization
  and forward compatibility for unknown operation types
- Parser classes for request, response, and events
- Jackson serializer/deserializer registration in RESTSerializers
- Comprehensive serialization/deserialization tests
@github-actions github-actions Bot added the core label May 12, 2026
@visit2rahul visit2rahul changed the title Implement IRC Events endpoint request and response objects (#13580) Core: Implement IRC Events endpoint request and response objects May 12, 2026
@visit2rahul
Copy link
Copy Markdown
Author

Quick context for reviewers — this issue has been attempted twice before:

Both are now closed, so this is the only active PR for #13580.

@nastra — your earlier review on #14142 laid out four concrete requirements. Mapping each to this PR for ease of review:

  1. Request/response classes in their respective packages

    • core/src/main/java/org/apache/iceberg/rest/requests/QueryEventsRequest.java
    • core/src/main/java/org/apache/iceberg/rest/responses/QueryEventsResponse.java
  2. Separate JSON parser classes with tests

    • Parsers: QueryEventsRequestParser, QueryEventsResponseParser, EventParser, CatalogOperationParser
    • Tests: TestQueryEventsRequestParser, TestQueryEventsResponseParser, TestEventParser
  3. Parsers registered in RESTSerializers

    • core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java updated
  4. All new types under the rest package in iceberg-core

    • Everything sits under core/src/main/java/org/apache/iceberg/rest/{events,requests,responses}/

Followed the parser patterns from your referenced commits (1cb88a6 and f19643a).

@c-thiel — tagging you as the proposal author; happy to incorporate any feedback on the operation-type modeling or event semantics.

@stevenzwu
Copy link
Copy Markdown
Contributor

@visit2rahul I already opened a draft PR: #15990

We need to address some spec discussions first

@visit2rahul
Copy link
Copy Markdown
Author

Thanks for the heads-up @stevenzwu — didn't see the draft PR. Happy to close this in favor of #15990, or if there are parts of this work that are useful I'm glad to help. Let me know how you'd like to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IRC Events Endpoint Implementation: Request & Response Objects

2 participants