-
Notifications
You must be signed in to change notification settings - Fork 11
Relational operators on nested fields in flat collections #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relational operators on nested fields in flat collections #243
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use a strategy pattern and pass the object instance via. PostgresQueryParser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: