feat: JSON.MERGE plus unit and integration tests#95
Conversation
|
Can you please add --sign off to the commits?: https://github.com/valkey-io/valkey-json/pull/95/checks?check_run_id=59176701849 |
I guess I made a mess trying to fix it |
Yeah, its okay , you can just run these commands and it should be fine: |
9301a02 to
3bb9a5d
Compare
Done |
roshkhatri
left a comment
There was a problem hiding this comment.
Great PR, just some suggestions and may need to add more tests
b53bf08 to
9713e53
Compare
|
The failing CI would be fixed once we merge the latest unstable into this branch |
|
I am not sure though why these are failing: https://github.com/valkey-io/valkey-json/actions/runs/20278225578/job/58232842208 |
c8376e8 to
c62cd5a
Compare
|
@patrickn2 thanks for the fixes. Allow me some time to review again! |
mkmkme
left a comment
There was a problem hiding this comment.
Hey! Here are some opinionated drive-by comments on the PR. Could you have a look please?
roshkhatri
left a comment
There was a problem hiding this comment.
I dont have more to add to what @sarthakaggarwal97 and @mkmkme
I think just rebasing onto unstable should work
|
@patrickn2, if possible, can you please take a look at the feedback? |
|
I guess I fixed everything guys |
c8e2180 to
bdbf4b4
Compare
…ck Nogueira <patricknn@gmail.com> Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…it and add unit tests for depth limit scenarios Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…d improve memory tracking. Update unit tests for merge values. Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…ses, and add unit tests for various merge scenarios Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…ts for various merge scenarios including array and object replacements Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…, mixed updates, error handling, and no-op scenarios Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
This reverts commit ac5a0e4. Signed-off-by: Roshan Khatri <rvkhatri@amazon.com> Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
- Introduced a new configuration key `json.max-path-limit` to set the maximum nesting depth for JSON documents. - Updated README.md to include details about the new configuration option, its default value, and usage instructions. - Modified merge_values function to ensure proper handling of empty objects during merging. - Adjusted the command info for JSON.MERGE to reflect a new parameter value. Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…fixed them Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…nd add a new unit test for object replacement in merging - Moved the check for empty objects in merge_values to ensure proper handling during merging. - Added a unit test to verify that an object replaces an array at a specified key in the merge process. Signed-off-by: patricknn@gmail.com <patricknn@gmail.com> Made-with: Cursor Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…ormance - Changed key type from std::string to std::string_view to reduce unnecessary copies. - Updated key member check in merge_values to utilize the new key type. Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
…inimize unnecessary copies. Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
Signed-off-by: patrick.nogueira@fox.com Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
Signed-off-by: patrick.nogueira@fox.com Signed-off-by: patrick.nogueira@fox.com <patrick.nogueira@fox.com>
bdbf4b4 to
b1f8569
Compare
|
There were some stray changes in the history, removed and pushed it, should be easier to review the PR now |
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
787e805 to
c57b920
Compare
Co-authored-by: Roshan Khatri <117414976+roshkhatri@users.noreply.github.com> Signed-off-by: Patrick Nery Nogueira <119355744+patrickn2@users.noreply.github.com>
JSON.MERGE Command
Followed instructions here https://redis.io/docs/latest/commands/json.merge/
Closes #74.