REFRESH FUNCTION

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 Delta and Apache Spark caching for the differences between the Delta cache 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;