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

Refine functions and add parsing test to set and zset #1475

Merged
merged 4 commits into from
May 26, 2023
Merged

Refine functions and add parsing test to set and zset #1475

merged 4 commits into from
May 26, 2023

Conversation

zncleon
Copy link
Contributor

@zncleon zncleon commented May 26, 2023

  • Refine functions
    spop
    srandmember
    zpop

  • Add parsing test
    spop
    srandmember
    zadd
    zincby
    zlexcount
    zpop
    zunionstore

In addition, srandmember not consider the case of a negative count and return an empty list or set,should we give it a definite action?

Close #1469

src/commands/cmd_zset.cc Outdated Show resolved Hide resolved
Co-authored-by: hulk <hulk.website@gmail.com>
Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for your contribution.

@git-hulk
Copy link
Member

Hi @zncleon

In addition, srandmember not consider the case of a negative count and return an empty list or set,should we give it a definite action?

In this case, we can behave consistently with the Redis.

@infdahai
Copy link
Contributor

a nice contribution!

@zncleon
Copy link
Contributor Author

zncleon commented May 26, 2023

ok,@git-hulk

In this case, we can behave consistently with the Redis.

now srandmember only returns always first N members if not changed.
I will implement its(as well as zrandmember #1459) random algorithm according to Redis.

@infdahai
Copy link
Contributor

yeah, you can do this(or give a new PR about this special problem).

@git-hulk
Copy link
Member

ok,@git-hulk

In this case, we can behave consistently with the Redis.

now srandmember only returns always first N members if not changed. I will implement its(as well as zrandmember #1459) random algorithm according to Redis.

@zncleon Cool, can submit an issue to track this.

@git-hulk
Copy link
Member

Thanks all, mergin...

@git-hulk git-hulk merged commit e066781 into apache:unstable May 26, 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.

Refine functions and add parsing tests to Set
5 participants