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
Prev Previous commit
Next Next commit
wip
  • Loading branch information
noisersup committed Oct 20, 2023
commit 80ba1aedf566b84531d2ec46fdab8be1c143dfb0
4 changes: 2 additions & 2 deletions internal/backends/postgresql/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ func (c *collection) Explain(ctx context.Context, params *backends.ExplainParams

res.QueryPushdown = where != ""

q += where
noisersup marked this conversation as resolved.
Show resolved Hide resolved

if params.Sort != nil {
var sort string
var sortArgs []any
Expand All @@ -329,8 +331,6 @@ func (c *collection) Explain(ctx context.Context, params *backends.ExplainParams
res.SortPushdown = sort != ""
}

q += where

if params.Limit != 0 {
q += fmt.Sprintf(` LIMIT %s`, placeholder.Next())
args = append(args, params.Limit)
Expand Down
Loading