Catalog.
functionExists
Check if the function with the specified name exists. This can either be a temporary function or a function.
New in version 3.3.0.
name of the function to check existence
name of the database to check function existence in. If no database is specified, the current database is used
Indicating whether the function exists
Examples
>>> spark.catalog.functionExists("unexisting_function") False