class_docstr: Engine spec for clickhouse_sqlalchemy connector
docstr: 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
docstr_tok: ["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"]
code: 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
      """
      system_functions_sql = "SELECT name FROM system.functions"
      try:
          df = database.get_df(system_functions_sql)
          if cls._show_functions_column in df:
              return df[cls._show_functions_column].tolist()
          columns = df.columns.values.tolist()
          logger.error(
              "Payload from `%s` has the incorrect format. "
              "Expected column `%s`, found: %s.",
              system_functions_sql,
              cls._show_functions_column,
              ", ".join(columns),
              exc_info=True,
          )
          # if the results have a single column, use that
          if len(columns) == 1:
              return df[columns[0]].tolist()
      except Exception as ex:  # pylint: disable=broad-except
          logger.error(
              "Query `%s` fire error %s. ",
              system_functions_sql,
              str(ex),
              exc_info=True,
          )
          return []
  
      # otherwise, return no function names to prevent errors
      return []
  
imports: from __future__ import annotations
  import logging
  import re
  from datetime import datetime
  from typing import Any, cast, TYPE_CHECKING
  from flask import current_app
  from flask_babel import gettext
  from marshmallow import fields, Schema
  from marshmallow.validate import Range
  from sqlalchemy import types
  from sqlalchemy.engine.url import URL
  from urllib3.exceptions import NewConnectionError
  from superset.databases.utils import make_url_safe
  from superset.db_engine_specs.base import BaseEngineSpec, BasicParametersMixin, BasicParametersType, BasicPropertiesType
  from superset.db_engine_specs.exceptions import SupersetDBAPIDatabaseError
  from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
  from superset.extensions import cache_manager
  from superset.utils.core import GenericDataType
  from superset.utils.hashing import md5_sha_from_str
  from superset.utils.network import is_hostname_valid, is_port_open
label_desc: Use image node_id 3 for calling the ClickHouseEngineSpec obj's underlying member method code with example usage: obj.get_function_names(cls, database) and returns: list, df, df, list