Skip to content

Conversation

@patelraj0602
Copy link
Contributor

… structure

Description

Please include a summary of the change, motivation and context.

Testing

Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.

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

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

@codecov
Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 48.48485% with 85 lines in your changes missing coverage. Please review.

Project coverage is 78.55%. Comparing base (b091041) to head (3dc0f34).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ore/documentstore/postgres/PostgresCollection.java 8.33% 55 Missing ⚠️
...resContainsRelationalFilterParserNonJsonField.java 9.09% 10 Missing ⚠️
...ter/PostgresNotContainsRelationalFilterParser.java 50.00% 3 Missing and 2 partials ⚠️
...config/TypesafeConfigDatastoreConfigExtractor.java 83.33% 2 Missing and 1 partial ⚠️
...er/filter/PostgresNotInRelationalFilterParser.java 62.50% 1 Missing and 2 partials ⚠️
...tore/model/config/mongo/MongoConnectionConfig.java 0.00% 0 Missing and 2 partials ⚠️
.../documentstore/postgres/PostgresQueryExecutor.java 50.00% 1 Missing and 1 partial ⚠️
...ter/PostgresRelationalFilterParserFactoryImpl.java 83.33% 0 Missing and 2 partials ⚠️
...e/documentstore/model/config/ConnectionConfig.java 83.33% 0 Missing and 1 partial ⚠️
...odel/config/postgres/PostgresConnectionConfig.java 50.00% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #223      +/-   ##
============================================
- Coverage     79.60%   78.55%   -1.05%     
- Complexity     1048     1069      +21     
============================================
  Files           204      206       +2     
  Lines          5084     5228     +144     
  Branches        416      449      +33     
============================================
+ Hits           4047     4107      +60     
- Misses          741      813      +72     
- Partials        296      308      +12     
Flag Coverage Δ
integration 78.55% <48.48%> (-1.05%) ⬇️
unit 55.83% <44.24%> (-0.48%) ⬇️

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

github-actions bot commented May 21, 2025

Test Results

 40 files  ±0   40 suites  ±0   33s ⏱️ ±0s
247 tests +1  247 ✅ +1  0 💤 ±0  0 ❌ ±0 
503 runs  +1  503 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 3dc0f34. ± Comparison against base commit b091041.

♻️ This comment has been updated with latest results.

protected final ObjectMapper MAPPER = new ObjectMapper();
protected ResultSet resultSet;
private final boolean removeDocumentId;
final boolean removeDocumentId;
Copy link
Contributor

Choose a reason for hiding this comment

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

Making this package private may introduce some confusion and can be error prone. Can we see if it's possible to avoid it?

private void addColumnToJsonNode(
ObjectNode jsonNode, String columnName, String columnType, int columnIndex)
throws SQLException {
switch (columnType.toLowerCase()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Did we face some issue, while using this one - mapValueToJsonNode? Can that be reused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes we ran into a issue, that's why we created this separately

Copy link
Contributor

@kotharironak kotharironak left a comment

Choose a reason for hiding this comment

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

Lets add few test cases.

* different strategies for handling containment operations based on the context of the query (e.g.,
* first-class fields vs. JSON fields).
*/
public interface PostgresContainsRelationalFilterParserInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we supporting CONTAINS already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, some queries have that so I added it

String flatStructureCollection = context.getFlatStructureCollectionName();
boolean isFirstClassField =
flatStructureCollection != null
&& flatStructureCollection.equals(context.getTableIdentifier().getTableName());
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we are applying to specific table name match. So, either table is flat table or it may contains json or non-json field. Looks like we are adding few checks, assuming we will do re-work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we have added a jira to relook at this

@patelraj0602 patelraj0602 merged commit 32efd42 into main Jun 12, 2025
5 of 7 checks passed
@patelraj0602 patelraj0602 deleted the patch/apiEntities/postgresSearchQueries branch June 12, 2025 08:55
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.

4 participants