
Hello, On 02/21/2013 11:43 AM, Sjoerd Mullender wrote:
Take a look at http://www.monetdb.org/content/internal-changes-feb2013-release for some information about what has changed. It doesn't help you directly, but it does give some background. You may be able to figure out what needs to be changed, or at least where to look.
I feel that this is an area that deserves to be improved in MonetDB. Is it really necessary to have a deep knowledge of the MonetDB internals in order to create a custom aggregate function? Can we have a "stable" interface to code against? I have developed "custom aggregates" for PostgreSQL, MS SQL Server and H2. Please compare and contrast the simplicity of developing a custom aggregate in these databases: PostgreSQL: http://www.postgresql.org/docs/9.2/static/sql-createaggregate.html MS-SQL Server: http://technet.microsoft.com/en-us/library/ms131051%28v=sql.90%29.aspx H2: http://www.h2database.com/javadoc/org/h2/api/AggregateFunction.html The MonetDB equivalent is ... well... grep'ing through source code, searching the mailing lists, lots of trial and error, interpreting cryptic error messages (if we are lucky enough to have one), stepping trough debuggers and in general having a miserable experience. Anyway... I don't want to sound ungrateful, MonetDB really is something amazing and you guys absolutely rock for offering the world the fruits of your intellect but please be aware that for most us mere mortals creating custom aggregates in MonetDB is severely non trivial. I was reading trough the above blog post and thinking "cool!... very cool! ... wow! even faster!... amazing" and then hit me... "crap! I will have to port the custom aggregates to this version... there goes my week". It would really help to have a small and simple example on how to do it (and no, that XMLagg monstrosity doesn't count)... something simple like a string concatenation function... with easy steps like: 1 - this is the interface you must implement 2 - look at this sample implementation (with nice comments that explain what is happening) 3 - this is how to build it 4 - this is how you register the function 5 - profit! Best regards. -- Luis Neves