-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add support for command JSON.ARRAPPEND
#485
Comments
could you please assign this to me @arpitbbhayani |
@raghavbabbar you already have a few on your plate, once you wrap that you can pick this one. trying to be fair here to others :) but thank you so much for being so eager. |
@arpitbbhayani, I can pick this up. could you assign this to me? |
@srivastava-yash assigned, thanks for picking this up. |
@lucifercr07 @JyotinderSingh Quick question: So in JSON.ARRAPPEND we want to append to a list at a given path, so should I check the type of the fields that are already there in the array and then convert this value in the argument to the same type and only then append, right? |
You need to check the type of object already present at any path which you'd like to modify. If the object doesn't match the expected type you'll return an error. Ensure that test cases validating this behavior are also added. |
Add support for the
JSON.ARRAPPEND
command in DiceDB similar to theJSON.ARRAPPEND
command in Redis. Please refer to the following commit in Redis to understand the implementation specifics - source.Write unit and integration tests for the command referring to the tests written in the Redis codebase 7.2.5. For integration tests, you can refer to the
tests
folder. Note: they have usedTCL
for the test suite, and we need to port that to our way of writing integration tests using the relevant helper methods. Please refer to our tests directory.For the command, benchmark the code and measure the time taken and memory allocs using
benchmem
and try to keep them to the bare minimum.The text was updated successfully, but these errors were encountered: