Skip to content

Provide a way to merge Kll sketches deterministically - #695

Closed
thomasrebele wants to merge 1 commit into
apache:mainfrom
thomasrebele:tr/deterministic-merge
Closed

thomasrebele wants to merge 1 commit into
apache:mainfrom
thomasrebele:tr/deterministic-merge

Conversation

@thomasrebele

@thomasrebele thomasrebele commented Nov 24, 2025 •

Copy link
Copy Markdown

As explained in #693, it would be very helpful for certain downstream projects to be able to use the KLL sketches, while still getting a deterministic result.

This PR proposes to add a method KllSketch#merge(KllSketch, Random) as an alternative. Existing code will continue to run as before. New callers can consider to use the newly added method if they need deterministic results. A warning has been added to the javadoc of the new method, to make it clear that the error guarantees of the KLL sketch algorithm might no longer be valid.

@jmalkin

jmalkin commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

I am not in favor of this behavior. It is nearly always the wrong thing for users to do.

@leerho

leerho commented Jan 7, 2026

Copy link
Copy Markdown
Member

I'm going to close this for now. This is going to require a lot more discussion and perhaps a better solution, if any.

@leerho leerho closed this Jan 7, 2026
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.

3 participants