
Hi Babis,
Thanks again for the example steps to creating an aggregate.
Is there a typo in your code or is the C function supposed to take int* parameters?
I assumed it would be BATs like the MAL function signature?
Best regards and thanks,
Alastair
________________________________________
From: users-list
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
on behalf of Charalampos Nikolaou 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
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 _______________________________________________ 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