Only call topn when having_filters don't exist (#2075)

This commit is contained in:
vera-liu 2017-01-31 13:59:44 -08:00 committed by GitHub
parent e169c67760
commit 0c59fe933d
1 changed files with 1 additions and 1 deletions

View File

@ -2399,7 +2399,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable, ImportMixin):
if len(groupby) == 0:
del qry['dimensions']
client.timeseries(**qry)
if len(groupby) == 1:
if not having_filters and len(groupby) == 1:
qry['threshold'] = timeseries_limit or 1000
if row_limit and granularity == 'all':
qry['threshold'] = row_limit