superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: timeseries_limit should not be required for phase 2 (#4581)
Date Tue, 13 Mar 2018 16:25:17 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d0ec9f  timeseries_limit should not be required for phase 2 (#4581)
1d0ec9f is described below

commit 1d0ec9fe6e30ba0cddfc142c2ad851307439e435
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Tue Mar 13 09:25:14 2018 -0700

    timeseries_limit should not be required for phase 2 (#4581)
---
 superset/connectors/druid/models.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py
index caef04b..3eb7090 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -1068,10 +1068,7 @@ class DruidDatasource(Model, BaseDatasource):
         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
@@ -1151,7 +1148,8 @@ class DruidDatasource(Model, BaseDatasource):
 
             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'

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.

Mime
View raw message