mistercrunch commented on a change in pull request #4834: Load async sql lab results early
for Presto
URL: https://github.com/apache/incubator-superset/pull/4834#discussion_r192441773
##########
File path: superset/db_engine_specs.py
##########
@@ -737,12 +761,20 @@ def handle_cursor(cls, cursor, query, session):
while polled:
# Update the object and wait for the kill signal.
stats = polled.get('stats', {})
-
query = session.query(type(query)).filter_by(id=query.id).one()
if query.status in [QueryStatus.STOPPED, QueryStatus.TIMED_OUT]:
cursor.cancel()
break
+ if (
+ config.get('PREFETCH_ASYNC') and
+ (not query.has_loaded_early)
+ ):
+ query.has_loaded_early = True
+ limit = config.get('PREFETCH_ROWS')
Review comment:
`prefetch_count` would be a better name than `limit` as limit has different meaning around
limiting the query itself.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
|