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

PR: Support for OBJECT ENCODING #977

Closed
wants to merge 1 commit into from

Conversation

sashpawar11
Copy link
Contributor

@sashpawar11 sashpawar11 commented Oct 6, 2024

This PR adds support for OBJECT ENCODING and closes #964

Changes :

  • Support added for OBJECT ENCODING subcommand, supporting the relevant encoding types available in dicedb.
  • 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 - please review the changes.
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, thanks for the changes and adding support for new command OBJECT ENCODING. I have a suggestion regarding the eval.go changes. Would it be okay for us to use switch case rather than if statements to achieve the same.
Thanks

@sashpawar11 sashpawar11 closed this Oct 9, 2024
@sashpawar11 sashpawar11 deleted the docs-object branch October 9, 2024 04:48
@sashpawar11 sashpawar11 restored the docs-object branch October 9, 2024 05:00
@sashpawar11 sashpawar11 deleted the docs-object branch October 9, 2024 05:00
@sashpawar11 sashpawar11 restored the docs-object branch October 9, 2024 05:00
@sashpawar11 sashpawar11 deleted the docs-object branch October 9, 2024 05:00
@sashpawar11
Copy link
Contributor Author

Hey @lucifercr07 @JyotinderSingh @apoorvyadav1111 - closing this PR, my forked branch got slightly corrupted when merging too many new changes. Have create a new clean PR - #1039 and posted the new updates on it per suggestions provided here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature : Add Support for OBJECT ENCODING
2 participants