Skip to content

MOD-11358 integrate ijson to the json module (#1394)#1414

Merged
AvivDavid23 merged 1 commit into8.4from
8.4-avivd
Oct 15, 2025
Merged

MOD-11358 integrate ijson to the json module (#1394)#1414
AvivDavid23 merged 1 commit into8.4from
8.4-avivd

Conversation

@AvivDavid23
Copy link
Contributor

@AvivDavid23 AvivDavid23 commented Oct 15, 2025

  • initial, but tests fails

  • change all to clone for testing

  • Revert "change all to clone for testing"

This reverts commit 5af50a4.

  • Revert "Revert "change all to clone for testing""

This reverts commit 852a223.

  • Revert "Revert "Revert "change all to clone for testing"""

This reverts commit 4252d45.

  • complies, tests are failing

  • better macro

  • debug

  • fix values set for arrays

  • Revert "debug"

This reverts commit d3e8e5518fea0aa0fcde5e781f7f68c9bffbc1ea.

  • remove print

  • Revert "Revert "debug""

This reverts commit 3056dfc5b907eca917267dee636facfcfab82102.

  • fix tests

  • Revert "Revert "Revert "debug"""

This reverts commit cd40fd7aa2db86ca51e82a0604f215f8fbcc5ade.

  • c_api impl

  • cargo fmt

  • register c_api ver 6

  • add another test

  • test

  • fix

  • more coverage

  • more coverage

  • more coverage

  • test also integer + float numerics

  • remove get_at c api

  • bump ijson

  • update c_api

  • fix

  • CR

  • cargo fmt

  • c_api

  • fmt

  • free data

  • c_api

  • header fix

  • cr

  • add benchmark

  • c_api

  • refine test

  • refine test

  • add json_api_get_value_from_ptr

  • fix c_api

  • fmt

  • fix bench

  • move is_equal of select values

  • fix

(cherry picked from commit 9a5f051)


Note

Introduce ValueRef-based zero-copy traversal, add typed numeric array operations, and update the C API to v6 with alloc/free and revised accessors.

  • Core/json_path:
    • Introduce ValueRef (borrowed/owned) across SelectValue, iterators (values, items, get_key, get_index) and path eval; add helper macros for handling owned/borrowed.
    • Update PathCalculator, filter evaluation, and outputs to use ValueRef; adjust public APIs (calc, calc_once, with-path variants) accordingly.
  • RedisJSON module:
    • Support homogeneous typed numeric arrays (i8/u8/i16/u16/f16/bf16/i32/u32/f32/i64/u64/f64) with in-place ops (ARRAPPEND/ARRINSERT/ARRTRIM, numeric ops) via new PathValue handling.
    • Migrate command implementations to ValueRef (e.g., Values, KeyValue, equality moved to select_value::is_equal).
    • Memory usage and some expectations adjusted.
  • C API (v6):
    • Add allocJson/freeJson and change getAt/nextKeyValue to fill a provided pointer; update iterators and wrappers; export API version 6.
    • Update header rejson_api.h with RedisJSONPtr and new function signatures; deprecate old pointer-returning getAt.
  • Deps/infra:
    • Bump ijson rev; add half, paste, crunchy.
    • Add benchmark dataset/config; update tests (including numeric array types) and tweak thresholds.

Written by Cursor Bugbot for commit c77a28d. This will update automatically on new commits. Configure here.

* initial, but tests fails

* change all to clone for testing

* Revert "change all to clone for testing"

This reverts commit 5af50a4.

* Revert "Revert "change all to clone for testing""

This reverts commit 852a223.

* Revert "Revert "Revert "change all to clone for testing"""

This reverts commit 4252d45.

* complies, tests are failing

* better macro

* debug

* fix values set for arrays

* Revert "debug"

This reverts commit d3e8e5518fea0aa0fcde5e781f7f68c9bffbc1ea.

* remove print

* Revert "Revert "debug""

This reverts commit 3056dfc5b907eca917267dee636facfcfab82102.

* fix tests

* Revert "Revert "Revert "debug"""

This reverts commit cd40fd7aa2db86ca51e82a0604f215f8fbcc5ade.

* c_api impl

* cargo fmt

* register c_api ver 6

* add another test

* test

* fix

* more coverage

* more coverage

* more coverage

* test also integer + float numerics

* remove get_at c api

* bump ijson

* update c_api

* fix

* CR

* cargo fmt

* c_api

* fmt

* free data

* c_api

* header fix

* cr

* add benchmark

* c_api

* refine test

* refine test

* add json_api_get_value_from_ptr

* fix c_api

* fmt

* fix bench

* move is_equal of select values

* fix

(cherry picked from commit 9a5f051)
@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 66.74528% with 141 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.09%. Comparing base (b524a91) to head (c77a28d).
⚠️ Report is 2 commits behind head on 8.4.

Files with missing lines Patch % Lines
redis_json/src/c_api.rs 1.16% 85 Missing ⚠️
redis_json/src/ivalue_manager.rs 80.83% 23 Missing ⚠️
json_path/src/json_path.rs 80.43% 18 Missing ⚠️
json_path/src/select_value.rs 82.05% 7 Missing ⚠️
json_path/src/json_node.rs 77.77% 6 Missing ⚠️
redis_json/src/key_value.rs 93.93% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #1414      +/-   ##
==========================================
- Coverage   79.28%   78.09%   -1.19%     
==========================================
  Files          15       16       +1     
  Lines        3707     3908     +201     
==========================================
+ Hits         2939     3052     +113     
- Misses        768      856      +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AvivDavid23 AvivDavid23 merged commit 3b5ba9e into 8.4 Oct 15, 2025
19 of 21 checks passed
@AvivDavid23 AvivDavid23 deleted the 8.4-avivd branch October 15, 2025 10:25
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.

2 participants