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

Pushdown simplest sorting for aggregate command #2530

Merged
merged 26 commits into from
May 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
noisersup committed Apr 28, 2023
commit ae050282c1131400c8aac6477ef4e5358e771f9c
10 changes: 8 additions & 2 deletions internal/handlers/pg/msg_aggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,14 @@ func (h *Handler) MsgAggregate(ctx context.Context, msg *wire.OpMsg) (*wire.OpMs
qp := pgdb.QueryParams{
DB: db,
Collection: collection,
Filter: filter,
Sort: sort,
}

if !h.DisableFilterPushdown {
qp.Filter = filter
}

if h.EnableSortPushdown {
qp.Sort = sort
}

resDocs, err = processStagesDocuments(ctx, &stagesDocumentsParams{dbPool, &qp, stagesDocuments})
Expand Down