mirror of https://github.com/apache/superset.git
Fix top groups with user defined metrics (#6073)
This commit is contained in:
parent
9b4cf856dd
commit
247a85b916
|
@ -19,7 +19,7 @@ assists people when migrating to a new version.
|
||||||
* Superset 0.28 upgrades `flask-login` to `>=0.3`, which includes a
|
* Superset 0.28 upgrades `flask-login` to `>=0.3`, which includes a
|
||||||
backwards-incompatible change: `g.user.is_authenticated`,
|
backwards-incompatible change: `g.user.is_authenticated`,
|
||||||
`g.user.is_anonymous`, and `g.user.is_active` are now properties
|
`g.user.is_anonymous`, and `g.user.is_active` are now properties
|
||||||
instead of properties.
|
instead of methods.
|
||||||
|
|
||||||
## Superset 0.27.0
|
## Superset 0.27.0
|
||||||
* Superset 0.27 start to use nested layout for dashboard builder, which is not
|
* Superset 0.27 start to use nested layout for dashboard builder, which is not
|
||||||
|
|
|
@ -757,7 +757,11 @@ class SqlaTable(Model, BaseDatasource):
|
||||||
'order_desc': True,
|
'order_desc': True,
|
||||||
}
|
}
|
||||||
result = self.query(subquery_obj)
|
result = self.query(subquery_obj)
|
||||||
dimensions = [c for c in result.df.columns if c not in metrics]
|
cols = {col.column_name: col for col in self.columns}
|
||||||
|
dimensions = [
|
||||||
|
c for c in result.df.columns
|
||||||
|
if c not in metrics and c in cols
|
||||||
|
]
|
||||||
top_groups = self._get_top_groups(result.df, dimensions)
|
top_groups = self._get_top_groups(result.df, dimensions)
|
||||||
qry = qry.where(top_groups)
|
qry = qry.where(top_groups)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue