A customer has requested the ability to write custom functions. I think its a great idea!
I've completed re-organizing the code that implements all the internal functions. Internal function support was originally developed with this in mind, so it wasn't too bad. However, when I later added support for aggregate functions, I hadn't followed the same design pattern.
I'm not following the approach Microsoft took using attributes. Instead, you derived from a base call, override a couple of methods and register the function with the query engine.
Anyway, its coming in a the next week or so. I'm also including an application/assembly to demonstrate writing a custom function or aggregate.
The hardest part has been coming up with something practical and useful.