-
Notifications
You must be signed in to change notification settings - Fork 11
Filter post unwind #79
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #79 +/- ##
============================================
+ Coverage 77.78% 77.91% +0.12%
- Complexity 361 364 +3
============================================
Files 65 65
Lines 1796 1811 +15
Branches 178 179 +1
============================================
+ Hits 1397 1411 +14
Misses 284 284
- Partials 115 116 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| return iterable.cursor(); | ||
| } | ||
|
|
||
| private static Collection<BasicDBObject> reApplyFilterAfterUnwind(Query query) { |
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.
This may clearly affect performance.
Can't filter be just done after unwind?
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.
The filter step before unwind is necessary to reduce the amount of documents unwind is applied to.
Post filter is not affecting performance but yeah the forced filtering can reduce flexibility of this interface.
As discussed will introduce a filter inside the UnnestExpression for flexible filtering post each unwind step.
Effect of applying filter pre and post unwind is different, since unwind creates multiple document for the source document.
Applying the same filters again.