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: Fix display limit in sql lab (#5392)
Date Mon, 16 Jul 2018 18:58:26 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 bd47587  Fix display limit in sql lab (#5392)
bd47587 is described below

commit bd475879a47150dc549f06778cd8fa098089b16f
Author: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
AuthorDate: Mon Jul 16 21:58:21 2018 +0300

    Fix display limit in sql lab (#5392)
    
    * Fix display limit in sql lab
    
    * Add redundant variable from config.py
    
    * Fix test config
    
    * Change to SQL_MAX_ROW
    
    * Remove last remaining occurence of DISPLAY_SQL_MAX_ROW
---
 superset/config.py     | 3 +--
 superset/views/core.py | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/superset/config.py b/superset/config.py
index bd02bb4..65f3887 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -250,8 +250,7 @@ BACKUP_COUNT = 30
 MAPBOX_API_KEY = os.environ.get('MAPBOX_API_KEY', '')
 
 # Maximum number of rows returned in the SQL editor
-SQL_MAX_ROW = 1000000
-DISPLAY_SQL_MAX_ROW = 1000
+SQL_MAX_ROW = 1000
 
 # Maximum number of tables/views displayed in the dropdown window in SQL Lab.
 MAX_TABLE_NAMES = 3000
diff --git a/superset/views/core.py b/superset/views/core.py
index 0e51eac..7ada916 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2477,7 +2477,7 @@ class Superset(BaseSupersetView):
                 '{}'.format(rejected_tables)))
 
         payload = utils.zlib_decompress_to_string(blob)
-        display_limit = app.config.get('DISPLAY_SQL_MAX_ROW', None)
+        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]


Mime
View raw message