feat(cmd): support OBJECT ENCODING and OBJECT HELP subcommands - #3638
Open
ReturnKartikey wants to merge 2 commits into
Open
ReturnKartikey wants to merge 2 commits into
ReturnKartikey wants to merge 2 commits into
Conversation
This implements Redis-compatible OBJECT ENCODING <key> and OBJECT HELP subcommands: - Update CommandObject arity from 3 to -2 and key range to dynamic callback - Add Parse() to validate subcommands (dump, encoding, help) and arguments - Support OBJECT ENCODING returning appropriate representation for strings (int/raw), lists (quicklist), hashes/sets (hashtable), zsets (skiplist), streams (stream), JSON (json), and nil when key does not exist - Support OBJECT HELP summarizing available subcommands - Add integration tests covering OBJECT HELP, OBJECT ENCODING across data types, and error handling for unknown subcommands or invalid arguments Closes apache#595 Relates to apache#3516
|
Hi @ReturnKartikey, Thank you for your pull request. Please review our Contributing Guide. Please make sure you understand your changes and explain your reasoning in this pull request. Low-quality pull requests may be closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the Redis-compatible
OBJECT ENCODING <key>andOBJECT HELPsubcommands in Kvrocks, addressing #595 and contributing to #3516.Summary of Changes
CommandObject:Parse()to validate subcommands (dump,encoding,help) and arity.3to-2and added dynamicRange()key extractor.OBJECT ENCODING <key>mapping internal types to Redis encodings:int, otherwiseraw.quicklist.hashtable.skiplist.stream.json.nil.OBJECT HELPreturning subcommand summary.tests/gocase/unit/introspection/introspection_test.goverifyingOBJECT HELP,OBJECT ENCODINGacross multiple data types,OBJECT DUMP, and error handling for invalid arguments and subcommands.Closes #595
Relates to #3516