![](https://secure.gravatar.com/avatar/cd1867f903700f5181d204645766dc37.jpg?s=120&d=mm&r=g)
Hi Babis,
Thanks for your guidance that is very useful indeed!
I am not entirely clear on how a specific SUM aggregate query maps to a particular MAL signature/C function in aggr.mal.
For example, if I had
CREATE TABLE T ( int a, float b, float c );
SELECT a,SUM(b+c) FROM T GROUP BY a;
What MAL function signature would this result in?
Best regards and thanks,
Alastair ________________________________________ From: users-list users-list-bounces+a.mckinley=analyticsengines.com@monetdb.org on behalf of Charalampos Nikolaou charnik@di.uoa.gr Sent: 19 November 2013 14:15 To: Communication channel for MonetDB users Subject: Re: User Defined Aggregations in MonetDB?
Hi Alastair,
sure you can do that. You can have a look at the following files:
http://dev.monetdb.org/hg/MonetDB/file/af39d1a659f6/monetdb5/modules/kernel/... http://dev.monetdb.org/hg/MonetDB/file/af39d1a659f6/monetdb5/modules/kernel/... http://dev.monetdb.org/hg/MonetDB/file/af39d1a659f6/gdk/gdk_aggr.c
This article should be helpful and informative as well to you that explains how aggregates and grouping works inside MonetDB: http://www.monetdb.org/content/internal-changes-feb2013-release
Regards, Babis
On Tue, Nov 19, 2013 at 3:42 PM, Alastair McKinley a.mckinley@analyticsengines.com wrote:
Dear all,
I was wondering if it is possible to build a User Defined Aggregation in MonetDB.
For example, rather than do SUM(myfunction(a,b)) I would like to do MYAGG(a,b) where MYAGG internally holds a small buffer of a and b values so that they can be calculated in a batch fashion with a high performance batch implementation of the function.
Could MYAGG be implemented in C?
Best regards,
Alastair
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list