-
Notifications
You must be signed in to change notification settings - Fork 66
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
Go: Implement Sort, Sort ReadOnly and Sort Store commands #2888
base: main
Are you sure you want to change the base?
Go: Implement Sort, Sort ReadOnly and Sort Store commands #2888
Conversation
10c81db
to
072f75b
Compare
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
072f75b
to
ca3c534
Compare
go/api/command_options.go
Outdated
@@ -279,6 +280,128 @@ func (listDirection ListDirection) toString() (string, error) { | |||
} | |||
} | |||
|
|||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these changes into a separate file under package options
.
@@ -225,3 +225,254 @@ func (suite *GlideTestSuite) TestConfigSetAndGet_invalidArgs() { | |||
assert.Equal(suite.T(), map[api.Result[string]]api.Result[string]{}, result2) | |||
assert.Nil(suite.T(), err) | |||
} | |||
|
|||
func (suite *GlideTestSuite) TestSortWithOptions_ExternalWeights() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this functionality specific to standalone or a particular version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some SORT
options (searching in multiple keys) available only in standalone mode.
It was planned to support this on server side in cluster mode with condition that all keys are mapped to the same slot. I don't know the status of this feature - could you check please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the valkey documentation, this is specific to a particular version 8.0.0 https://valkey.io/commands/sort/. I modified the tests accordingly.
@@ -225,3 +225,254 @@ func (suite *GlideTestSuite) TestConfigSetAndGet_invalidArgs() { | |||
assert.Equal(suite.T(), map[api.Result[string]]api.Result[string]{}, result2) | |||
assert.Nil(suite.T(), err) | |||
} | |||
|
|||
func (suite *GlideTestSuite) TestSortWithOptions_ExternalWeights() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some SORT
options (searching in multiple keys) available only in standalone mode.
It was planned to support this on server side in cluster mode with condition that all keys are mapped to the same slot. I don't know the status of this feature - could you check please?
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
…ey-glide into niharika-sortcmds
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
…ey-glide into niharika-sortcmds
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
…ey-glide into niharika-sortcmds
Implementing the Sort, Sort ReadOnly and Sort Store commands in GO client.