group_concat

Tapomay Dey tapomay at yahoo.com
Thu Dec 13 15:23:42 CET 2012


Almost there.
As suggested by Fabian in the following thread I gave up the MX file approach and implemented group_concat as UDF in C.
http://sourceforge.net/mailarchive/forum.php?thread_name=mailman.243.1355328304.1624.developers-list%40monetdb.org&forum_name=monetdb-developers


When I try to conclude my function UDFBATgroup_concat_(BAT **ret, BAT *b, BAT *g, BAT *h, FILE* fp) //ignore fp
as follows:

BATaccessBegin(h, USE_HEAD | USE_TAIL, MMAP_SEQUENTIAL);
index = 0;
BATloop(h, p, q)
{
ptr hhead = BUNhead(hi, p);
fprintf(fp, "%d: hhead=%d", index, hhead);
str dst = tailValArray[index];
fprintf(fp, "%d: dstStr=%s# ", index, dst);

BUNins(bn, hhead, dst, FALSE);
fprintf(fp, "%d: Insert complete\n", index);
index++;
}

I get the following error on the client terminal
[tapomay at tapomay-laptop monetdata]$ echo "select house, group_concat(name) from gs group by house;" | mclient -d tapomay
GDKerror:!ERROR: BUNins: access denied to tmp_10162, aborting.
BUNins: access denied to tmp_10162, aborting.
BUNins: access denied to tmp_10162, aborting.

The groupings are ready in the tailVarArray.

NEED HELP.
Thanks and Regards,
Tapomay.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20121213/e27caa80/attachment.html>
-------------- next part --------------
_______________________________________________
developers-list mailing list
developers-list at monetdb.org
http://mail.monetdb.org/mailman/listinfo/developers-list


More information about the developers-list mailing list