Presto support user defined expressions as SQL functions, these are dynamic functions separated from Presto Source code and managed by the function namespace manager.
Function Namespace Manager
It is a plugin that manages a set of these function catalog schemas. This user defined function management is separated from connector API for flexibility, hence these SQL functions can be used across all connectors. Further, the query is guaranteed to use the same version of the function throughout the execution and any modification to the functions is versioned.
It is a special
catalog.schema format that stores functions, by defaut
ahana.default function namespace will be created for all Ahana clusters.
Here is simple example of SQL function for COSECANT:
It is required for users to use fully qualified function name while using in SQL query.
Following the the example of using cosec SQL function in the query.