Skip to content

Commit

Permalink
Fix display limit in sql lab (#5392)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
villebro authored and timifasubaa committed Jul 16, 2018
1 parent 2eeff2a commit bd47587
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,7 @@ def results(self, key):
'{}'.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]
Expand Down

0 comments on commit bd47587

Please sign in to comment.