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 pushdown for aggregate for PostgreSQL #3607

Merged
merged 10 commits into from
Oct 23, 2023

Conversation

noisersup
Copy link
Member

@noisersup noisersup commented Oct 18, 2023

Description

Closes #3520.

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

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #3607 (8a4dd60) into main (05a2ee3) will decrease coverage by 0.61%.
The diff coverage is 55.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3607      +/-   ##
==========================================
- Coverage   62.09%   61.48%   -0.61%     
==========================================
  Files         427      427              
  Lines       27701    27730      +29     
==========================================
- Hits        17200    17050     -150     
- Misses       9501     9656     +155     
- Partials     1000     1024      +24     
Files Coverage Δ
internal/backends/postgresql/collection.go 64.25% <100.00%> (-5.32%) ⬇️
internal/handlers/sqlite/msg_explain.go 58.69% <75.00%> (-16.01%) ⬇️
internal/handlers/sqlite/msg_aggregate.go 84.01% <41.66%> (-3.10%) ⬇️

... and 20 files with indirect coverage changes

Flag Coverage Δ
filter-false ?
filter-true 58.10% <55.26%> (-0.60%) ⬇️
hana-1 ?
integration 58.10% <55.26%> (-0.61%) ⬇️
mongodb-1 4.45% <0.00%> (-0.03%) ⬇️
postgresql-1 42.82% <55.26%> (+0.27%) ⬆️
postgresql-2 39.89% <55.26%> (-0.07%) ⬇️
postgresql-3 42.05% <55.26%> (-0.10%) ⬇️
sort-false 58.10% <55.26%> (-0.18%) ⬇️
sort-true ?
sqlite-1 42.18% <50.00%> (-0.08%) ⬇️
sqlite-2 39.33% <50.00%> (-0.02%) ⬇️
sqlite-3 41.58% <50.00%> (-0.30%) ⬇️
unit 22.66% <0.00%> (-0.08%) ⬇️

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

@mergify
Copy link
Contributor

mergify bot commented Oct 18, 2023

@noisersup this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Oct 18, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Oct 19, 2023
@noisersup noisersup added the code/chore Code maintenance improvements label Oct 19, 2023
@noisersup noisersup added this to the Next milestone Oct 19, 2023
@noisersup noisersup requested review from a team, rumyantseva and chilagrow October 19, 2023 15:25
@noisersup noisersup marked this pull request as ready for review October 19, 2023 15:25
@noisersup noisersup marked this pull request as draft October 19, 2023 15:26
@noisersup noisersup marked this pull request as ready for review October 19, 2023 16:48
@noisersup noisersup enabled auto-merge (squash) October 19, 2023 16:48
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

I think logic is not correct

internal/handlers/sqlite/msg_aggregate.go Show resolved Hide resolved
internal/handlers/sqlite/msg_explain.go Outdated Show resolved Hide resolved
@chilagrow chilagrow requested a review from a team October 20, 2023 08:42
@noisersup noisersup requested a review from a team October 20, 2023 08:43
@noisersup noisersup requested a review from AlekSi as a code owner October 20, 2023 15:03
@rumyantseva rumyantseva requested a review from chilagrow October 20, 2023 19:27
Copy link
Member

@chilagrow chilagrow 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 fixing the bug as well.

internal/backends/postgresql/collection.go Show resolved Hide resolved
@noisersup noisersup merged commit 0a526c0 into FerretDB:main Oct 23, 2023
26 checks passed
@noisersup noisersup deleted the aggregation-pushdown-sqlite-3520 branch October 23, 2023 10:02
@AlekSi AlekSi added code/feature Some user-visible feature is not implemented yet and removed code/chore Code maintenance improvements labels Oct 23, 2023
@AlekSi AlekSi changed the title Implement pushdown for aggregate Implement pushdown for aggregate for PostgreSQL Oct 23, 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 pushdown for aggregation pipelines
3 participants