Skip to content

Return JsonNode directly in JSONDocument#318

Open
suddendust wants to merge 3 commits into
mainfrom
returnJsonNodeDirectlyFromDoc
Open

Return JsonNode directly in JSONDocument#318
suddendust wants to merge 3 commits into
mainfrom
returnJsonNodeDirectlyFromDoc

Conversation

@suddendust

@suddendust suddendust commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a method Document#getJsonNode() that returns the JsonNode corresponding to a document. This method is useful to avoid double translation in client that currently read the JSON string and convert it to a JsonNode. With this, they can avoid this deserialisation.

Testing

Change is trivial, added a UT.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.89%. Comparing base (ec45778) to head (77d882a).

Files with missing lines Patch % Lines
...va/org/hypertrace/core/documentstore/Document.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #318      +/-   ##
============================================
- Coverage     80.90%   80.89%   -0.01%     
- Complexity     1579     1580       +1     
============================================
  Files           242      242              
  Lines          7626     7628       +2     
  Branches        751      751              
============================================
+ Hits           6170     6171       +1     
- Misses          967      968       +1     
  Partials        489      489              
Flag Coverage Δ
integration 80.89% <50.00%> (-0.01%) ⬇️
unit 55.34% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Test Results

  124 files  ±0    124 suites  ±0   39s ⏱️ -1s
  846 tests +1    845 ✅ +1  1 💤 ±0  0 ❌ ±0 
1 183 runs  +1  1 182 ✅ +1  1 💤 ±0  0 ❌ ±0 

Results for commit 77d882a. ± Comparison against base commit ec45778.

♻️ This comment has been updated with latest results.

suresh-prakash
suresh-prakash previously approved these changes Jul 16, 2026
@suresh-prakash

Copy link
Copy Markdown
Contributor

Good optimisation.

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.

3 participants