From notifications-return-1502-archive-asf-public=cust-asf.ponee.io@superset.apache.org Fri Jun 1 18:34:15 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5C361180771 for ; Fri, 1 Jun 2018 18:34:15 +0200 (CEST) Received: (qmail 99006 invoked by uid 500); 1 Jun 2018 16:34:14 -0000 Mailing-List: contact notifications-help@superset.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.apache.org Delivered-To: mailing list notifications@superset.apache.org Received: (qmail 98967 invoked by uid 99); 1 Jun 2018 16:34:14 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2018 16:34:14 +0000 From: GitBox To: notifications@superset.apache.org Subject: [GitHub] mistercrunch commented on a change in pull request #4834: Load async sql lab results early for Presto Message-ID: <152787085389.16501.4025410969226833314.gitbox@gitbox.apache.org> Date: Fri, 01 Jun 2018 16:34:13 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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