Overloading functions and aggregates
You can create UDXs that have the same name, but which have different argument signatures and return types. This process is called overloading the definition.
For example, assume that you have a function that is called greatest_value that can take two or three input integers and which returns the greatest of the input values.
MYDB.SCHEMA(MYUSER)=> CREATE FUNCTION greatest_value(INT64, INT64) RETURNS
INT64...
MYDB.SCHEMA(MYUSER)=> CREATE FUNCTION greatest_value(INT64, INT64, INT64)
RETURNS INT64...
If a user calls greatest_value with two input values, the system uses the first (two-argument) function. If the user specifies three input values, the system uses the second function that accepts three input values.
You can use overloading to support different combinations of input values, return types, or both. However, overloading and uniquely named but similar functions and aggregates have a maintenance overhead; if you need to update or redesign the body of the UDX, you must update each UDX with the changes that you want to make.