Skip to content

Implement Collection#search for FlatPostgresCollection#285

Merged
suddendust merged 7 commits intomainfrom
flatPGCollectionSearch
Apr 7, 2026
Merged

Implement Collection#search for FlatPostgresCollection#285
suddendust merged 7 commits intomainfrom
flatPGCollectionSearch

Conversation

@suddendust
Copy link
Copy Markdown
Contributor

Description

This PR adds support for FlatPostgresCollection#search(org.hypertrace.core.documentstore.Query query). This is basically the legacy query. The approach taken is to use a LegacyQueryToV2QueryTransformer that converts a v1 query to a v2 query and then use the regular query( final org.hypertrace.core.documentstore.query.Query query, final QueryOptions queryOptions) method.

Testing

Added integration tests.

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

@suddendust suddendust changed the title Flat pg collection search Implement Collection#search for FlatPostgresCollection Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 78.46154% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.30%. Comparing base (080d894) to head (b9b1a76).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...1/transformer/LegacyQueryToV2QueryTransformer.java 77.04% 3 Missing and 11 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #285      +/-   ##
============================================
+ Coverage     81.21%   81.30%   +0.08%     
- Complexity     1486     1521      +35     
============================================
  Files           240      241       +1     
  Lines          7240     7305      +65     
  Branches        685      700      +15     
============================================
+ Hits           5880     5939      +59     
+ Misses          929      924       -5     
- Partials        431      442      +11     
Flag Coverage Δ
integration 81.30% <78.46%> (+0.08%) ⬆️
unit 55.41% <69.23%> (+0.67%) ⬆️

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

☔ 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Test Results

  113 files  + 7    113 suites  +7   35s ⏱️ -2s
  792 tests +17    791 ✅ +17  1 💤 ±0  0 ❌ ±0 
1 129 runs  +29  1 128 ✅ +29  1 💤 ±0  0 ❌ ±0 

Results for commit b9b1a76. ± Comparison against base commit 080d894.

♻️ This comment has been updated with latest results.

}

@Override
public CloseableIterator<Document> search(org.hypertrace.core.documentstore.Query query) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a deprecated method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is. However, there are uses cases of clients using this, so a transformation somewhere is needed.

@suddendust suddendust merged commit 2fe1f90 into main Apr 7, 2026
6 of 7 checks passed
@suddendust suddendust deleted the flatPGCollectionSearch branch April 7, 2026 12:06
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