REFRESH FUNCTION

适用于:check marked yes Databricks Runtime

使 Apache Spark 缓存的缓存函数项(包括给定函数的类名和资源位置)无效。 立即填充无效缓存。 请注意,REFRESH FUNCTION 仅适用于永久函数。 刷新本机函数或临时函数将导致异常。

语法

REFRESH FUNCTION function_name

有关磁盘缓存与 Apache 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;