metabase / metabase/macaw

Using filter + within group is not supported

Open
#75 0 comments 0 reactions 0 assignees View on GitHub
.Team/BackendComponents bug
Dominant language
Clojure
Stars
23
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Here is a minimally reproducing query:

```sql
select
e.instance_id
-- this next one is fine
, percentile_cont(0.75) within group (order by e.running_time) / 1000.0 as p75_time
-- this is also fine
, avg(e.running_time) filter (where e.error = '') / 1000.0 as avg_success_time
-- this one causes a parse error
, percentile_cont(0.75) within group (order by e.running_time) filter (where e.error = '') / 1000.0 as p75_success_time
from execution e
group by 1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Begin with the minimal SQL reproduction and the Clojure wrapper's parsing entry point; compare the supported standalone WITHIN GROUP and FILTER forms. Done means the combined expression parses successfully, with a regression test covering the query.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, sql
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.