Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#238: PFADD/PFCOUNT implementation #422

Conversation

lucifercr07
Copy link
Contributor

@lucifercr07 lucifercr07 commented Aug 29, 2024

  • Adding support for PFADD/PFCOUNT command implementation.
  • Hyperloglog implementation library used: axiomhq/hyperloglog
  • Current implementation only supports Sparse representation and doesn't switch to Dense once threshold is reached as done by Redis. Also it doesn't do caching as part of PFCOUNT.
  • TODO In follow up PR when implementing PFMERGE, PFDEBUG etc.:
    • Look into caching implementation if required for PFCOUNT.
    • Benchmark tests for current implementation.
    • Benchmark testing for Sparse and Dense representations.
    • Analyse feasibility of switch between Sparse and Dense representations based on benchmark testing.

@lucifercr07 lucifercr07 marked this pull request as ready for review August 30, 2024 11:56
core/query_watcher.go Outdated Show resolved Hide resolved
core/executor.go Outdated Show resolved Hide resolved
@lucifercr07
Copy link
Contributor Author

@JyotinderSingh / @soumya-codes please review once. Few considerations have listed as part of description here.

@JyotinderSingh JyotinderSingh self-requested a review September 2, 2024 06:30
@JyotinderSingh
Copy link
Collaborator

Could you resolve the conflicts for this PR?

@lucifercr07
Copy link
Contributor Author

@JyotinderSingh conflicts resolved. Please review once.

Copy link
Collaborator

@JyotinderSingh JyotinderSingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these changes @lucifercr07! The changes look good and well tested, just left one minor command.

tests/hyperloglog_test.go Show resolved Hide resolved
@JyotinderSingh
Copy link
Collaborator

TODO In follow up PR when implementing PFMERGE, PFDEBUG etc.:

  • Look into caching implementation if required for PFCOUNT.
  • Benchmark tests for current implementation.
  • Benchmark testing for Sparse and Dense representations.
  • Analyse feasibility of switch between Sparse and Dense representations based on benchmark testing.

Could you please create Issues for these TODOs to ensure we track them?

@lucifercr07
Copy link
Contributor Author

TODO In follow up PR when implementing PFMERGE, PFDEBUG etc.:

  • Look into caching implementation if required for PFCOUNT.
  • Benchmark tests for current implementation.
  • Benchmark testing for Sparse and Dense representations.
  • Analyse feasibility of switch between Sparse and Dense representations based on benchmark testing.

Could you please create Issues for these TODOs to ensure we track them?

Sure, will create. Will try to look into few of them as as part of PFMERGE, PFDEBUG implementations.

Copy link
Collaborator

@JyotinderSingh JyotinderSingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding HLL support to Dice @lucifercr07! The changes look good and well tested.
LGTM.

@JyotinderSingh JyotinderSingh merged commit ed7ae47 into DiceDB:master Sep 3, 2024
2 checks passed
rohitlohar45 pushed a commit to rohitlohar45/dice that referenced this pull request Sep 10, 2024
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.

2 participants