You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "zncleon (via GitHub)" <gi...@apache.org> on 2023/05/26 04:40:36 UTC

[GitHub] [incubator-kvrocks] zncleon opened a new pull request, #1475: Refine functions and add parsing test to set and zset

zncleon opened a new pull request, #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475

   - 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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] infdahai commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "infdahai (via GitHub)" <gi...@apache.org>.
infdahai commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564156191

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] infdahai commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "infdahai (via GitHub)" <gi...@apache.org>.
infdahai commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564112957

   a nice contribution!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564159578

   > 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #1475: Refine functions and add parsing test to set and zset

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#discussion_r1206399019


##########
src/commands/cmd_zset.cc:
##########
@@ -223,7 +223,9 @@ class CommandZPop : public Commander {
   explicit CommandZPop(bool min) : min_(min) {}
 
   Status Parse(const std::vector<std::string> &args) override {
-    if (args.size() > 2) {
+    if (args.size() > 3) {
+      return {Status::RedisParseErr, errWrongNumOfArguments};
+    } else if (args.size() == 3) {

Review Comment:
   ```suggestion
       }
   
       if (args.size() == 3) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] zncleon commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "zncleon (via GitHub)" <gi...@apache.org>.
zncleon commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564138150

    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. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk merged pull request #1475: Refine functions and add parsing test to set and zset

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] infdahai commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "infdahai (via GitHub)" <gi...@apache.org>.
infdahai commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564144533

   you can do that in another PR. By the way, if you want to write that function, you should think about the member/membersource function in zset(by referring to member func in set).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564061632

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on pull request #1475: Refine functions and add parsing test to set and zset

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #1475:
URL: https://github.com/apache/incubator-kvrocks/pull/1475#issuecomment-1564159823

   Thanks all, mergin...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org