Skip to content

Conversation

@findingrish
Copy link

@findingrish findingrish commented Apr 8, 2022

Effect of applying filter pre and post unwind is different, since unwind creates multiple document for the source document.
Applying the same filters again.

@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #79 (66a48f9) into main (a6c55e1) will increase coverage by 0.12%.
The diff coverage is 95.45%.

@@             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     
Flag Coverage Δ
integration 77.91% <95.45%> (+0.12%) ⬆️
unit 48.37% <59.09%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
...ocumentstore/expression/impl/UnnestExpression.java 72.72% <80.00%> (+1.29%) ⬆️
.../mongo/parser/MongoFilterTypeExpressionParser.java 100.00% <100.00%> (ø)
...re/mongo/parser/MongoFromTypeExpressionParser.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6c55e1...66a48f9. Read the comment docs.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

return iterable.cursor();
}

private static Collection<BasicDBObject> reApplyFilterAfterUnwind(Query query) {
Copy link
Contributor

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?

Copy link
Author

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.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@findingrish findingrish merged commit ef9124f into main Apr 13, 2022
@findingrish findingrish deleted the post-unwind-filter branch April 13, 2022 06:59
@github-actions
Copy link

Unit Test Results

  14 files  ±0    14 suites  ±0   5s ⏱️ -1s
  93 tests +2    93 ✔️ +2  0 💤 ±0  0 ❌ ±0 
143 runs  +2  143 ✔️ +2  0 💤 ±0  0 ❌ ±0 

Results for commit ef9124f. ± Comparison against base commit a6c55e1.

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