mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
[hotfix] only apply SQLAlchemy limit where needed
Observed issue in dev environment where SQL queries were emitted with `LIMIT 0`. This fix addresses it.
This commit is contained in:
parent
d3ace6d63f
commit
85fb4a933d
@ -515,7 +515,8 @@ class SqlaTable(Model, BaseDatasource):
|
|||||||
direction = asc if ascending else desc
|
direction = asc if ascending else desc
|
||||||
qry = qry.order_by(direction(col))
|
qry = qry.order_by(direction(col))
|
||||||
|
|
||||||
qry = qry.limit(row_limit)
|
if row_limit:
|
||||||
|
qry = qry.limit(row_limit)
|
||||||
|
|
||||||
if is_timeseries and \
|
if is_timeseries and \
|
||||||
timeseries_limit and groupby and not time_groupby_inline:
|
timeseries_limit and groupby and not time_groupby_inline:
|
||||||
|
Loading…
Reference in New Issue
Block a user