Skip to content
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

Fix query projection for top level fields #2386

Merged
merged 58 commits into from Apr 19, 2023

Conversation

w84thesun
Copy link
Contributor

@w84thesun w84thesun commented Apr 7, 2023

Description

Closes #2299.
Closes #537.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@w84thesun w84thesun added code/chore Code maintenance improvements no ci labels Apr 7, 2023
@w84thesun w84thesun self-assigned this Apr 7, 2023
@w84thesun w84thesun changed the title Refactor projection Fix query projection for top level fields Apr 14, 2023
@w84thesun w84thesun removed the no ci label Apr 14, 2023
@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #2386 (971c4e8) into main (3f0e290) will increase coverage by 39.16%.
The diff coverage is 67.45%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2386       +/-   ##
===========================================
+ Coverage   25.30%   64.46%   +39.16%     
===========================================
  Files         385      397       +12     
  Lines       18541    19631     +1090     
===========================================
+ Hits         4691    12656     +7965     
+ Misses      13320     6058     -7262     
- Partials      530      917      +387     
Impacted Files Coverage Δ
internal/handlers/common/projection.go 62.41% <61.60%> (+62.41%) ⬆️
integration/shareddata/shareddata.go 79.31% <81.08%> (ø)
internal/handlers/common/projection_iterator.go 80.00% <100.00%> (+80.00%) ⬆️

... and 131 files with indirect coverage changes

Flag Coverage Δ
integration 57.62% <67.45%> (?)
pg 57.62% <67.45%> (?)
unit 25.28% <0.00%> (-0.02%) ⬇️

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

noisersup
noisersup previously approved these changes Apr 18, 2023
@w84thesun
Copy link
Contributor Author

@noisersup sorry, forgot to add an interface check.

noisersup
noisersup previously approved these changes Apr 18, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 18, 2023

@w84thesun this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Apr 18, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Apr 18, 2023
chilagrow
chilagrow previously approved these changes Apr 19, 2023
integration/shareddata/shareddata.go Outdated Show resolved Hide resolved
Co-authored-by: Chi Fujii <chi.fujii@ferretdb.io>
Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

LGTM

@w84thesun w84thesun merged commit ef29eb5 into FerretDB:main Apr 19, 2023
20 checks passed
@w84thesun w84thesun deleted the refactor-projection branch April 19, 2023 10:46
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
@AlekSi AlekSi added this to the v1.1.0 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Projection with _id returns all fields Fix projections tests
5 participants