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

Implement $sum aggregation standard operator #3063

Merged
merged 15 commits into from
Jul 19, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Jul 18, 2023

Description

Closes #2680.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • 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/feature Some user-visible feature is not implemented yet label Jul 18, 2023
@chilagrow chilagrow self-assigned this Jul 18, 2023
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #3063 (efd12f5) into main (9ac03af) will increase coverage by 0.28%.
The diff coverage is 88.57%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3063      +/-   ##
==========================================
+ Coverage   76.30%   76.59%   +0.28%     
==========================================
  Files         386      388       +2     
  Lines       21165    21297     +132     
==========================================
+ Hits        16150    16312     +162     
+ Misses       4080     4059      -21     
+ Partials      935      926       -9     
Impacted Files Coverage Δ
...nal/handlers/common/aggregations/operators/type.go 79.71% <ø> (ø)
...andlers/common/aggregations/operators/operators.go 75.00% <50.00%> (+3.26%) ⬆️
...ommon/aggregations/stages/projection/projection.go 86.97% <74.24%> (-0.47%) ⬇️
...rnal/handlers/common/aggregations/operators/sum.go 94.28% <94.28%> (ø)
internal/handlers/common/aggregations/number.go 100.00% <100.00%> (ø)
.../common/aggregations/operators/accumulators/sum.go 88.88% <100.00%> (-4.52%) ⬇️

... and 12 files with indirect coverage changes

Flag Coverage Δ
hana ?
integration 73.12% <88.57%> (+0.29%) ⬆️
mongodb 5.50% <0.00%> (-0.04%) ⬇️
pg 66.46% <88.57%> (+0.15%) ⬆️
shard-1 56.97% <88.09%> (+8.01%) ⬆️
shard-2 55.09% <33.33%> (-0.03%) ⬇️
shard-3 57.16% <43.80%> (-0.52%) ⬇️
sqlite 46.46% <0.00%> (+2.88%) ⬆️
unit 24.07% <0.00%> (-0.16%) ⬇️

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 July 19, 2023 08:18
@chilagrow chilagrow requested a review from a team as a code owner July 19, 2023 08:18
@chilagrow chilagrow requested review from AlekSi, rumyantseva, a team, quasilyte and noisersup July 19, 2023 08:18
@chilagrow chilagrow enabled auto-merge (squash) July 19, 2023 08:18
noisersup
noisersup previously approved these changes Jul 19, 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.

LGTM

@chilagrow chilagrow requested a review from noisersup July 19, 2023 08:44
@AlekSi AlekSi removed request for AlekSi and quasilyte July 19, 2023 16:40
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.

I tried it locally, and to me, it works as expected!
The code also looks consistent.

@chilagrow chilagrow merged commit 4d534d6 into FerretDB:main Jul 19, 2023
@AlekSi AlekSi added this to the v1.7.0 milestone Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement $sum aggregation standard operator
4 participants