john-bodley 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_r183947742
 
 

 ##########
 File path: superset/utils.py
 ##########
 @@ -836,3 +881,16 @@ def ensure_path_exists(path):
     except OSError as exc:
         if not (os.path.isdir(path) and exc.errno == errno.EEXIST):
             raise
+
+
+def prefetch_key(key):
+    # given a key, this returns the location of the prefetched key
+    return '{}_prefetch'.format(key)
+
+
+def is_prefetch_key(key):
+    return key.endswith('_prefetch')
+
+
+def get_original_key(prefetch_key):
+    return prefetch_key[:-9]
 
 Review comment:
   Seems a tad brittle.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to