REFRESH 函式

適用於:檢查標示為是 Databricks Runtime

使 Apache Spark 快取的快取函式專案失效,其中包含指定函式的類別名稱和資源位置。 無效的快取會立即填入。 請注意, REFRESH FUNCTION 僅適用於永久函式。 重新整理原生函式或暫存函式會導致例外狀況。

語法

REFRESH FUNCTION function_name

如需磁碟快取與 Apache Spark 快取之間的差異,請參閱 磁碟快取與 Spark 快取。

參數

  • function_name

    函式名稱。 如果未限定的名稱,則會使用目前的架構。

範例

-- The cached entry of the function is refreshed
-- The function is resolved from the current schema as the function name is unqualified.
> REFRESH FUNCTION func1;

-- The cached entry of the function is refreshed
-- The function is resolved from tempDB schema as the function name is qualified.
> REFRESH FUNCTION sc1.func1;