Dashboard filter options lookup produces query that references non-existent column when linked question aggregates values #42829
Labels
.Frontend
Priority:P2
Average run of the mill bug
Querying/Parameters & Variables
Filter widgets, field filters, variables etc.
.Team/QueryingComponents
Type:Bug
Product defects
Describe the bug
When you have a dashboard filter, which is linked to a question that aggregates results, the request to get possible filtering options fails with a 500 error. The query it generates references a column that does not exist, as it is structure in a way that attempts to get possible values after aggregating, instead of prior.
To Reproduce
select * from people
Expected behavior
The request should not fail, and should return values that can be selected for filtering.
Logs
JS logs:
Error response:
Information about your Metabase installation
Severity
blocking usage of Metabase (almost) entirely
Additional context
This bug is not specific to version 0.49.11, and has been seen on other versions, including prior to the 0.49.x branch.
Attempted to aggregate using both "distinct values of" and "average of" summarization. Did not test others.
Tested with both the sample database, as well as a Postgres database.
Also attempted with a UI builder model (essentially the same query) with similar, but slightly different behavior. The options endpoint still fails, but when selecting a question field to link, I had to select a field other than
STATE
, as it was not in the selectable list (not sure if this is expected behavior, or a bug).The text was updated successfully, but these errors were encountered: