superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [incubator-superset] branch master updated: remove limiting at the display level (#5413)
Date Fri, 20 Jul 2018 00:36:07 GMT
This is an automated email from the ASF dual-hosted git repository.

timi 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 41447e8  remove limiting at the display level (#5413)
41447e8 is described below

commit 41447e8b3b3727f216673557ee8e783bdc4cf0ad
Author: timifasubaa <30888507+timifasubaa@users.noreply.github.com>
AuthorDate: Thu Jul 19 17:36:03 2018 -0700

    remove limiting at the display level (#5413)
---
 superset/sql_lab.py    | 3 ++-
 superset/views/core.py | 9 +--------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index 34a9eeb..b45cbbb 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -226,7 +226,8 @@ def execute_sql(
     if store_results:
         key = '{}'.format(uuid.uuid4())
         logging.info('Storing results in results backend, key: {}'.format(key))
-        json_payload = json.dumps(payload, default=utils.json_iso_dttm_ser)
+        json_payload = json.dumps(
+            payload, default=utils.json_iso_dttm_ser, ignore_nan=True)
         cache_timeout = database.cache_timeout
         if cache_timeout is None:
             cache_timeout = config.get('CACHE_DEFAULT_TIMEOUT', 0)
diff --git a/superset/views/core.py b/superset/views/core.py
index 9dc9030..07a4079 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2481,14 +2481,7 @@ class Superset(BaseSupersetView):
             return json_error_response(get_datasource_access_error_msg(
                 '{}'.format(rejected_tables)))
 
-        payload = utils.zlib_decompress_to_string(blob)
-        display_limit = app.config.get('SQL_MAX_ROW', None)
-        if display_limit:
-            payload_json = json.loads(payload)
-            payload_json['data'] = payload_json['data'][:display_limit]
-        return json_success(
-            json.dumps(
-                payload_json, default=utils.json_iso_dttm_ser, ignore_nan=True))
+        return json_success(utils.zlib_decompress_to_string(blob))
 
     @has_access_api
     @expose('/stop_query/', methods=['POST'])


Mime
View raw message