Skip to content

feat: add tuple theta implementation and tests#138

Open
ariesdevil wants to merge 2 commits into
apache:mainfrom
ariesdevil:dev_ariesdevil
Open

feat: add tuple theta implementation and tests#138
ariesdevil wants to merge 2 commits into
apache:mainfrom
ariesdevil:dev_ariesdevil

Conversation

@ariesdevil

Copy link
Copy Markdown

Summary

Implement the Tuple sketch behind a new tuple feature (built on top of theta). A Tuple sketch extends the Theta sketch by attaching a user-defined summary to every retained key, merging summaries on duplicate keys and during set operations.

Summary behavior is injected externally via policies (C++-style) rather than baked into the type.

Note

This implementation is highly inspired by the C++ version.

@ariesdevil ariesdevil force-pushed the dev_ariesdevil branch 2 times, most recently from a4fefa8 to 4f0c105 Compare June 24, 2026 05:45
@ariesdevil

Copy link
Copy Markdown
Author

@tisonkun @PsiACE PTAL if you have time.

@tisonkun tisonkun requested review from ZENOTME and tisonkun July 5, 2026 04:39
@tisonkun

tisonkun commented Jul 5, 2026

Copy link
Copy Markdown
Member

Thanks for your contribution @ariesdevil! I'll review this in the next week.

Comment thread datasketches/src/tuple/hash_table.rs Outdated
@ZENOTME

ZENOTME commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Based on #138 (comment) , looks like it's better to refactor ThetaHashTable, related set operation to generic version first. So that we can reuse them in tuple implementation.

@ariesdevil

Copy link
Copy Markdown
Author

Fixed, PTAL again.

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