I’m using hsql and another 3rd party library. To solve a certain problem I need to write my custom aggregate function. This page showed me how to do that: http://hsqldb.org/doc/2.0/guide/sqlroutines-chapt.html#src_jrt_routines
However, the other 3rd party tool restricts me to use only a predefined subset of aggregate functions. Is there any way to add an overloaded version e.g. to sum which takes a predefined type and then invokes my custom logic? I’m thinking of something very similar to the method overloading of java. Unfortunately create aggregate function custom_sum(...)... works, but create aggregate function sum(...)... doesn’t.
User functions cannot override built-in functions.
You can of course disable the SUM() function by modifying the HSQLDB sources.
What is the actual problem which forces you to provide your own version of SUM()?