Relational operators on nested fields in flat collections#243
Relational operators on nested fields in flat collections#243suresh-prakash merged 7 commits intohypertrace:mainfrom
Conversation
This reverts commit a333e89.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #243 +/- ##
============================================
+ Coverage 80.10% 80.41% +0.31%
- Complexity 1134 1151 +17
============================================
Files 215 215
Lines 5488 5495 +7
Branches 482 486 +4
============================================
+ Hits 4396 4419 +23
+ Misses 764 750 -14
+ Partials 328 326 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| boolean isFirstClassField = | ||
| postgresQueryParser.getPgColTransformer() instanceof FlatPostgresFieldTransformer; | ||
| // Check if LHS is a JSON field (JSONB column access) | ||
| boolean isJsonField = expression.getLhs() instanceof JsonIdentifierExpression; |
There was a problem hiding this comment.
@suresh-prakash I tried avoiding this instanceof check but using a visitor just to check this seems like an overkill. Do you think we can avoid this using some other method?
There was a problem hiding this comment.
Can use a strategy pattern and pass the object instance via. PostgresQueryParser.
There was a problem hiding this comment.
Discussed this offline. @suddendust will plan to pick this up separately.
Description
This Adds support for
CONTAINS,NOT CONTAINS,INandNOT INoperators for nested json fields for flat collections.Testing
Added integration tests for all relational operators in
FlatCollectionJsonbRelationalOperatorTest.Checklist: