...
Their DDLs are “CREATE/DROP TEMPORARY SYSTEM FUNCTION”.
Existing “registerScalar/Table/AggregateFunctions()” will be deprecated in favor of the new APIs.
b) Temporary Functions
We will add a new member variable to FunctionCatalog as “Map<ObjectIdentifier, UserDefinedFunction> tempFunctions“ to hold those temporary functions in a central place, and new APIs “registerTemporaryScalar/Table/AggregateFunction(ObjectIdentifier, UserDefinedFunction)”.
...
- Temporary system functions
- Flink Built-in functions
- Temporary functions, in the current catalog and current database of the session
- Catalog functions, in the current catalog and current database of the session
The new resolution order will be a breaking change, compared to existing resolution order.
Temp functions should rank above their corresponding persistent/built-in functions due to its temporary nature - users want to overwrite built-in or persistent functions with something temporary that is only visible to themselves and the session, and not impacting other users. In contrary, 1) if users don’t have the intention of overwriting other functions, they can just name the temporary functions to something else, considering the manipulation cost is so low for temporary objects, and 2) if built-in functions precede temporary functions, there’s no way to reference temp functions anymore
...