I've built this temp SQL function from the databricks reference but get the apache/hive error. This is about as simple as can be and the SQL works so why the error?
%sql
create or replace temporary function fn_infinity()
returns timestamp
return 
select to_timestamp('2099-12-31T23:59:59.999+0000')
 
Error: *org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
---------------------------------------------------------------------------
Py4JJavaError                             Traceback (most recent call last)
File /databricks/spark/python/pyspark/sql/utils.py:209, in capture_sql_exception.<locals>.deco(*a, **kw)
    208 try:
--> 209     return f(*a, **kw)
    210 except Py4JJavaError as e:
File /databricks/spark/python/lib/py4j-0.10.9.5-src.zip/py4j/protocol.py:326, in get_return_value(answer, gateway_client, target_id, name)
    325 if answer[1] == REFERENCE_TYPE:
--> 326     raise Py4JJavaError(
    327         "An error occurred while calling {0}{1}{2}.\n".
    328         format(target_id, ".", name), value)
    329 else:
Py4JJavaError: An error occurred while calling o363.sql.
: org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
I've tried reattaching the cluster. Could it be related to Unity Catalog? Appreciate any ideas.
 
    