villebro commented on a change in pull request #9033: feat: Add schema to 
function retrieval and implement for Snowflake
URL: 
https://github.com/apache/incubator-superset/pull/9033#discussion_r373600369
 
 

 ##########
 File path: superset/db_engine_specs/presto.py
 ##########
 @@ -947,13 +948,20 @@ def latest_sub_partition(cls, table_name, schema, 
database, **kwargs):
         return df.to_dict()[field_to_return][0]
 
     @classmethod
-    @cache.memoize()
-    def get_function_names(cls, database: "Database") -> List[str]:
+    def get_function_names(
+        cls, database: "Database", schema: Optional[str]
+    ) -> List[str]:
         """
         Get a list of function names that are able to be called on the 
database.
         Used for SQL Lab autocomplete.
 
         :param database: The database to get functions for
+        :param schema: The schema to get functions for (N/A for Presto)
 
 Review comment:
   Memoization is only done for the nested function (see `_get_function_names` 
below), i.e. will not be cached per schema.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to