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

add support for weights in zunionstore and zinterstore #641

Merged
merged 2 commits into from Jul 28, 2022

Conversation

ndd7xv
Copy link
Contributor

@ndd7xv ndd7xv commented Jun 26, 2022

Resolves #634

Let me know if there's a preferred way to adding WEIGHTS functionality (or anything else that needs to be added or changed!). I contemplated modifying the existing zinterstore and zunionstore functions, but realized that I would have to make a change to ToRedisArgs if I wanted to add this functionality while maintaining the same parameters.

@jaymell
Copy link
Contributor

jaymell commented Jun 30, 2022

Thanks for the PR! Can you possibly add some tests for the commands added?

src/commands.rs Outdated Show resolved Hide resolved
@ndd7xv ndd7xv force-pushed the z-weights branch 2 times, most recently from 021d621 to 3eb9de5 Compare July 5, 2022 21:50
@jaymell jaymell merged commit 6d8158d into redis-rs:main Jul 28, 2022
@wemgl
Copy link

wemgl commented Jul 29, 2022

My mind is blown! I was doing the exact same thing as @ndd7xv (going through Redis in Action), realized that a version of the zinterstore function that supports WEIGHT was missing, and did a quick Google search only to came across issue #634 from a week ago. You're a true saint for following through with this PR.

nonirosenfeldredis pushed a commit to nonirosenfeldredis/redis-rs that referenced this pull request Feb 13, 2023
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.

WEIGHTS option for ZUNIONSTORE/ZINTERSTORE
4 participants