Slach commented on a change in pull request #16234:
URL: https://github.com/apache/superset/pull/16234#discussion_r693050173
##########
File path: superset/db_engine_specs/clickhouse.py
##########
@@ -69,3 +76,33 @@ def convert_dttm(cls, target_type: str, dttm: datetime) ->
Optional[str]:
if tt == utils.TemporalType.DATETIME:
return f"""toDateTime('{dttm.isoformat(sep=" ",
timespec="seconds")}')"""
return None
+
+
+ @classmethod
+ @cache_manager.cache.memoize()
+ def get_function_names(cls, database: "Database") -> 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
+ :return: A list of function names usable in the database
+ """
+ df = database.get_df("SELECT name FROM system.functions")
Review comment:
@zhaoyongjie fixed on
https://github.com/apache/superset/pull/16234/commits/afd63bd1215848641a87c41bea7c62a5144c4fac
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]