Skip to content

Commit

Permalink
timeseries_limit should not be required for phase 2 (apache#4581)
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas authored and mistercrunch committed Mar 13, 2018
1 parent 8951990 commit 1d0ec9f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions superset/connectors/druid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,10 +1068,7 @@ def run_query( # noqa / druid
if not is_timeseries:
granularity = 'all'

if (
granularity == 'all' or
timeseries_limit is None or
timeseries_limit == 0):
if granularity == 'all':
phase = 1
inner_from_dttm = inner_from_dttm or from_dttm
inner_to_dttm = inner_to_dttm or to_dttm
Expand Down Expand Up @@ -1151,7 +1148,8 @@ def run_query( # noqa / druid

client.topn(**pre_qry)
logging.info('Phase 1 Complete')
query_str += '// Two phase query\n// Phase 1\n'
if phase == 2:
query_str += '// Two phase query\n// Phase 1\n'
query_str += json.dumps(
client.query_builder.last_query.query_dict, indent=2)
query_str += '\n'
Expand Down

0 comments on commit 1d0ec9f

Please sign in to comment.