REFRESH FUNCTION

Applies to: check marked yes Databricks Runtime

Invalidates the cached function entry for Apache Spark cache, which includes a class name and resource location of the given function. The invalidated cache is populated right away. Note that REFRESH FUNCTION only works for permanent functions. Refreshing native functions or temporary functions will cause an exception.

Syntax

REFRESH FUNCTION function_name

See Automatic and manual caching for the differences between disk caching and the Apache Spark cache.

Parameters

  • function_name

    A function name. If the name in unqualified the current schema is used.

Examples

-- 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;