Skip to content

refactor(req): remove ReqUnion - #242

Merged
tisonkun merged 2 commits into
apache:mainfrom
tisonkun:codex/remove-req-union
Aug 29, 2026
Merged

refactor(req): remove ReqUnion#242
tisonkun merged 2 commits into
apache:mainfrom
tisonkun:codex/remove-req-union

Conversation

@tisonkun

Copy link
Copy Markdown
Member

Summary

  • remove ReqUnion, which only delegated to an inner ReqSketch
  • keep ReqSketch::merge as the REQ aggregation API and add a usage example
  • update the README and unreleased changelog to describe merging without a separate union type

Rationale

The Java, C++, Python, and Go REQ implementations expose aggregation directly through the sketch's merge method. Unlike CPC, HLL, and Theta unions, ReqUnion maintained no distinct accumulator state or configuration-reconciliation behavior, and to_sketch cloned the wrapped sketch.

REQ has not been included in a release yet, so the discarded intermediate API does not require a migration entry. This change intentionally leaves the existing ReqSketch::merge compatibility rules, including mixed-k behavior, unchanged.

Testing

  • cargo x check
  • cargo x test
  • cargo x lint

Closes #217.

@tisonkun

Copy link
Copy Markdown
Member Author

@pmcgleenon Seems ReqUnion is almost identical to continuous calls to ReqSketch::merge. I tend to reduce concepts from users and add them only if needed or if concrete use cases occur.

@tisonkun
tisonkun marked this pull request as ready for review August 28, 2026 23:55
@tisonkun
tisonkun merged commit 3b555c7 into apache:main Aug 29, 2026
9 checks passed
@tisonkun

Copy link
Copy Markdown
Member Author

... to be clear, a merge is not a final decision. You can always do review after commits and revert a commit with a reason.

@tisonkun
tisonkun deleted the codex/remove-req-union branch August 29, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review ReqUnion

1 participant