mapleFU commented on code in PR #2262:
URL: https://github.com/apache/kvrocks/pull/2262#discussion_r1590709945


##########
src/commands/cmd_key.cc:
##########
@@ -424,6 +424,115 @@ class CommandCopy : public Commander {
   bool replace_ = false;
 };
 
+template <bool ReadOnly>
+class CommandSort : public Commander {
+ public:
+  Status Parse(const std::vector<std::string> &args) override {
+    CommandParser parser(args, 2);
+    while (parser.Good()) {
+      if (parser.EatEqICase("BY")) {
+        sort_argument_.sortby = GET_OR_RET(parser.TakeStr());

Review Comment:
   I mean, would "BY a BY b*" sequence making `sortby` has conflict stats (both 
dontsort and have properties)
   
   ```
   if (!sort_argument_.sortby.empty()) return InvalidArg();
   sort_argument_.sortby = GET_OR_RET(parser.TakeStr());
   ```
   
   Would this check better here?
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to