metabase / metabase

The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum:
https://metabase.com
Other
38.73k stars 5.15k forks source link

[MLv2] - Removing field from multistage query with implicit breakout causes error #35067

Open npfitz opened 1 year ago

npfitz commented 1 year ago

Currently in master, if you create a query that looks like this: image

You are unable to remove the count or Double count fields, as it will result in an error. It looks as though the field ref that is generated for the implicitly joined breakout field is incorrect, as it doesn't understand what PEOPLE__via__USER_ID__SOURCE is.

image image

snoe commented 11 months ago

I believe this only makes sense to tackle after the query processor is converted mlv2 - as it stands nest-expressions and source-metadata produces id field refs in too many places that changing it (which this requires) feels incredibly fragile.