superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] mistercrunch commented on a change in pull request #4834: Load async sql lab results early for Presto
Date Fri, 01 Jun 2018 16:34:13 GMT
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_r192440403
 
 

 ##########
 File path: superset/db_engine_specs.py
 ##########
 @@ -726,7 +728,29 @@ def extra_table_metadata(cls, database, table_name, schema_name):
         }
 
     @classmethod
-    def handle_cursor(cls, cursor, query, session):
+    def prefetch_results(cls, cursor, query, cache_timeout, session, limit):
+        data = cursor.fetchmany(limit)
+        column_names = cls.get_normalized_column_names(cursor.description)
+        cdf = utils.convert_results_to_df(column_names, data)
+        payload = dict(query_id=query.id)
 
 Review comment:
   Much of the logic here is not specific to Presto and should probably live in the base class
or outside this module. Maybe something like `cache_prefetched_data(data)`.

----------------------------------------------------------------
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


Mime
View raw message