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

Support dot notation in projection #2536

Merged
merged 26 commits into from
May 12, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented May 1, 2023

Description

Closes #2430.

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), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@chilagrow chilagrow added the code/enhancement Some user-visible feature could work better label May 1, 2023
@chilagrow chilagrow self-assigned this May 1, 2023
@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Merging #2536 (2af1b44) into main (f98dc95) will decrease coverage by 38.40%.
The diff coverage is 0.63%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2536       +/-   ##
===========================================
- Coverage   65.98%   27.58%   -38.40%     
===========================================
  Files         419      419               
  Lines       20553    20703      +150     
===========================================
- Hits        13561     5711     -7850     
- Misses       6039    14405     +8366     
+ Partials      953      587      -366     
Impacted Files Coverage Δ
internal/handlers/common/projection.go 0.00% <0.00%> (-71.07%) ⬇️
integration/shareddata/shareddata.go 85.71% <100.00%> (+0.18%) ⬆️

... and 137 files with indirect coverage changes

Flag Coverage Δ
integration 5.36% <0.63%> (-53.56%) ⬇️
mongodb 5.36% <0.63%> (-0.04%) ⬇️
pg ?
unit 26.01% <0.00%> (-0.23%) ⬇️

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

@chilagrow chilagrow marked this pull request as ready for review May 10, 2023 09:52
@chilagrow chilagrow requested a review from a team as a code owner May 10, 2023 09:52
@chilagrow chilagrow requested review from AlekSi and w84thesun May 10, 2023 09:52
@chilagrow chilagrow enabled auto-merge (squash) May 10, 2023 09:52
@chilagrow chilagrow requested review from a team, rumyantseva and noisersup May 10, 2023 09:52
noisersup
noisersup previously approved these changes May 10, 2023
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

Great job implementing all this logic! Added comment rendering suggestion.

internal/handlers/common/projection.go Outdated Show resolved Hide resolved
@chilagrow chilagrow requested a review from w84thesun May 11, 2023 10:44
w84thesun
w84thesun previously approved these changes May 11, 2023
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@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.

Great job clarifying how projection works with dot notation and corner cases! I added a couple of questions about tests and errors.

internal/handlers/common/projection.go Outdated Show resolved Hide resolved
internal/handlers/common/projection.go Show resolved Hide resolved
internal/handlers/common/projection.go Show resolved Hide resolved
internal/handlers/common/projection.go Outdated Show resolved Hide resolved
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

Thanks for the extended comments! LGTM

@chilagrow chilagrow merged commit 2516bb1 into FerretDB:main May 12, 2023
@AlekSi AlekSi added this to the Next milestone May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/enhancement Some user-visible feature could work better
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support dot notation in query projections
5 participants