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

Support HSTRLEN command. #115

Merged
merged 11 commits into from
Mar 27, 2024
Merged

Support HSTRLEN command. #115

merged 11 commits into from
Mar 27, 2024

Conversation

argsno
Copy link
Contributor

@argsno argsno commented Mar 24, 2024

Support HSTRLEN command.

Returns the string length of the value associated with field in the hash stored at key. If the key or the field do not exist, 0 is returned.

Interested in being able to deepen my understanding by implementing some small features. thx.

refer: #76

Copy link
Contributor

@TalZaccai TalZaccai left a comment

Choose a reason for hiding this comment

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

Nice work! Added a few comments :)
Thanks for your contribution!

libs/server/API/GarnetWatchApi.cs Outdated Show resolved Hide resolved
libs/server/Objects/Hash/HashObjectImpl.cs Outdated Show resolved Hide resolved
test/Garnet.test/RespHashTests.cs Show resolved Hide resolved
@badrishc
Copy link
Contributor

Make sure you use the error handling logic introduced in this recent PR: #103

@argsno
Copy link
Contributor Author

argsno commented Mar 26, 2024

Make sure you use the error handling logic introduced in this recent PR: #103

Yes, I have modify the code to use the same handling logic

@TalZaccai TalZaccai linked an issue Mar 26, 2024 that may be closed by this pull request
@TalZaccai TalZaccai self-assigned this Mar 26, 2024
@yrajas
Copy link
Contributor

yrajas commented Mar 26, 2024

Please make sure to update documentation to indicate HSTRLEN is supported now.
Under website/docs/commands/api-compatibility.md

@argsno
Copy link
Contributor Author

argsno commented Mar 26, 2024

Please make sure to update documentation to indicate HSTRLEN is supported now. Under website/docs/commands/api-compatibility.md

thanks, The api-compatibility.md and data-structures.md file have been updated to reflect HSTRLEN support.

@vazois vazois added the API label Mar 26, 2024
@TalZaccai TalZaccai self-requested a review March 27, 2024 00:47
@TalZaccai
Copy link
Contributor

TalZaccai commented Mar 27, 2024

I'm encountering an issue that seems to happen subsequently to when an error is returned. Please take a look...
Note how after "wrong number of arguments" we're getting "unknown command" for the same input
image

@argsno
Copy link
Contributor Author

argsno commented Mar 27, 2024

I'm encountering an issue that seems to happen subsequently to when an error is returned. Please take a look... Note how after "wrong number of arguments" we're getting "unknown command" for the same input image

After parsing the incorrect command, a return is missed. I apologize for the bug I introduced.

@TalZaccai
Copy link
Contributor

I'm encountering an issue that seems to happen subsequently to when an error is returned. Please take a look... Note how after "wrong number of arguments" we're getting "unknown command" for the same input image

After parsing the incorrect command, a return is missed. I apologize for the bug I introduced.

No worries at all!

Copy link
Contributor

@TalZaccai TalZaccai left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks again for your work!

@TalZaccai TalZaccai merged commit 439e312 into microsoft:main Mar 27, 2024
13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Coverage - Implement HSTRLEN
5 participants