mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Make orderby native sqla construct (#8180)
This commit is contained in:
parent
4e1e54b538
commit
15e623898d
@ -794,6 +794,8 @@ class SqlaTable(Model, BaseDatasource):
|
||||
direction = asc if ascending else desc
|
||||
if utils.is_adhoc_metric(col):
|
||||
col = self.adhoc_metric_to_sqla(col, cols)
|
||||
elif col in cols:
|
||||
col = cols[col].get_sqla_col()
|
||||
qry = qry.order_by(direction(col))
|
||||
|
||||
if row_limit:
|
||||
|
Loading…
Reference in New Issue
Block a user