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 $type aggregation operator #2789

Merged
merged 24 commits into from Jun 13, 2023

Conversation

noisersup
Copy link
Member

@noisersup noisersup commented Jun 5, 2023

Description

This PR is a first part of this issue. More advanced error handling for recursive calls will be introduce in separate PR to not overcomplicate the review process.

Closes #2678.

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.

@noisersup noisersup added the not ready Issues that are not ready to be worked on; PRs that should skip CI label Jun 5, 2023
@noisersup noisersup self-assigned this Jun 5, 2023
@noisersup noisersup added code/feature Some user-visible feature is not implemented yet area/aggregations Issues about aggregation pipelines labels Jun 5, 2023
@noisersup noisersup removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #2789 (92f1af2) into main (8ad2489) will increase coverage by 0.10%.
The diff coverage is 74.28%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2789      +/-   ##
==========================================
+ Coverage   63.81%   63.91%   +0.10%     
==========================================
  Files         442      442              
  Lines       22527    22602      +75     
==========================================
+ Hits        14376    14447      +71     
+ Misses       7212     7207       -5     
- Partials      939      948       +9     
Impacted Files Coverage Δ
...nal/handlers/common/aggregations/operators/type.go 65.57% <64.40%> (+65.57%) ⬆️
...andlers/common/aggregations/operators/operators.go 72.22% <73.91%> (+25.16%) ⬆️
...nternal/handlers/common/aggregations/expression.go 95.45% <100.00%> (-0.05%) ⬇️
.../common/aggregations/operators/accumulators/sum.go 93.40% <100.00%> (+0.38%) ⬆️
...ernal/handlers/common/aggregations/stages/group.go 76.79% <100.00%> (+0.39%) ⬆️
...ommon/aggregations/stages/projection/projection.go 85.60% <100.00%> (+0.53%) ⬆️
...rnal/handlers/common/aggregations/stages/unwind.go 83.00% <100.00%> (+0.52%) ⬆️
Flag Coverage Δ
integration 56.98% <74.28%> (+0.12%) ⬆️
mongodb 5.01% <0.00%> (-0.02%) ⬇️
pg 56.90% <74.28%> (+0.12%) ⬆️
shard-1 43.84% <70.47%> (+0.51%) ⬆️
shard-2 43.88% <11.42%> (-0.14%) ⬇️
shard-3 42.33% <14.28%> (-0.13%) ⬇️
unit 25.10% <0.00%> (-0.14%) ⬇️

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

@noisersup noisersup marked this pull request as ready for review June 8, 2023 22:25
@noisersup noisersup requested a review from a team as a code owner June 8, 2023 22:25
@noisersup noisersup enabled auto-merge (squash) June 8, 2023 22:25
@noisersup noisersup requested review from a team, rumyantseva and chilagrow June 8, 2023 22:26
@noisersup noisersup requested a review from chilagrow June 12, 2023 17:20
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!

@noisersup noisersup merged commit 9536bab into FerretDB:main Jun 13, 2023
42 of 51 checks passed
@noisersup noisersup deleted the type-aggregation-2678 branch June 13, 2023 13:08
@AlekSi AlekSi added this to the v1.4.0 milestone Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aggregations Issues about aggregation pipelines 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 $type aggregation operator
4 participants