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

#964 Support for OBJECT ENCODING #1039

Merged
merged 5 commits into from
Oct 13, 2024

Conversation

sashpawar11
Copy link
Contributor

This PR adds support for OBJECT ENCODING and closes #964

This PR consists of additional updates suggested on the previous PR #977 and supersedes it.

Changes :

  • Support added for OBJECT ENCODING subcommand, supporting the relevant encoding types available in dicedb.
  • Handled types and encoding using switch cases as opposed to the previous implementation in PR: Support for OBJECT ENCODING #977
  • Integration tests cover all the cases in-depth.
  • Unit test cases cover basic test coverage for the subcommand.

Note:

  • The tests do not contain a case for the encoding type 'setint' ( ObjEncodingSetInt), as currently we do not encode sets as ints. We can add this case in the future when we integrate the functionality for encoding sets as ints.

Supported Object Types and Object Encoding:

Object Type Object Encoding
string raw
string embstr
int int
bytelist deque
bitset bf
json json
bytearray bytearray
set setstr
set setint
hashmap hashmap
sortedset btree

@sashpawar11
Copy link
Contributor Author

Hi @lucifercr07 @JyotinderSingh @apoorvyadav1111 - have added the new changes in this PR based on the comments in the old PR.
Please review.

Thankyou.

Copy link
Contributor

@apoorvyadav1111 apoorvyadav1111 left a comment

Choose a reason for hiding this comment

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

Hey, I ran tests in my local and I can see we are not running a cleanup after test cases. While individual tests might not be affected, running the whole suite without clean up can lead to failure. You can use defer at the start of the function along with FLUSHDB or choose to individually run cleanup after individual tests.

integration_tests/commands/async/object_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@apoorvyadav1111 apoorvyadav1111 left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me. Approved 🚀

@apoorvyadav1111 apoorvyadav1111 changed the title PR: Support for OBJECT ENCODING #964 Support for OBJECT ENCODING Oct 13, 2024
@apoorvyadav1111 apoorvyadav1111 merged commit 33b70f8 into DiceDB:master Oct 13, 2024
2 checks passed
kakdeykaushik pushed a commit to kakdeykaushik/dice that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature : Add Support for OBJECT ENCODING
2 participants