mirror of https://github.com/apache/superset.git
remove limiting at the display level (#5413)
This commit is contained in:
parent
6441f69271
commit
41447e8b3b
|
@ -226,7 +226,8 @@ def execute_sql(
|
||||||
if store_results:
|
if store_results:
|
||||||
key = '{}'.format(uuid.uuid4())
|
key = '{}'.format(uuid.uuid4())
|
||||||
logging.info('Storing results in results backend, key: {}'.format(key))
|
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
|
cache_timeout = database.cache_timeout
|
||||||
if cache_timeout is None:
|
if cache_timeout is None:
|
||||||
cache_timeout = config.get('CACHE_DEFAULT_TIMEOUT', 0)
|
cache_timeout = config.get('CACHE_DEFAULT_TIMEOUT', 0)
|
||||||
|
|
|
@ -2481,14 +2481,7 @@ class Superset(BaseSupersetView):
|
||||||
return json_error_response(get_datasource_access_error_msg(
|
return json_error_response(get_datasource_access_error_msg(
|
||||||
'{}'.format(rejected_tables)))
|
'{}'.format(rejected_tables)))
|
||||||
|
|
||||||
payload = utils.zlib_decompress_to_string(blob)
|
return json_success(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))
|
|
||||||
|
|
||||||
@has_access_api
|
@has_access_api
|
||||||
@expose('/stop_query/', methods=['POST'])
|
@expose('/stop_query/', methods=['POST'])
|
||||||
|
|
Loading…
Reference in New Issue