This message was forwarded from developers-l...@monetdb.org.  The MonetDB
mailing lists have moved to monetdb.org.  Please subscribe to
developers-l...@monetdb.org, and unsubscribe from this list.
See: http://mail.monetdb.org/mailman/listinfo/developers-list

Send developers-list mailing list submissions to
        developers-l...@monetdb.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.monetdb.org/mailman/listinfo/developers-list
or, via email, send a message with subject or body 'help' to
        developers-list-requ...@monetdb.org

You can reach the person managing the list at
        developers-list-ow...@monetdb.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of developers-list digest..."


Today's Topics:

   1. group_concat (Tapomay Dey)
   2. Re: group_concat (Stefan Manegold)


----------------------------------------------------------------------

Message: 1
Date: Thu, 13 Dec 2012 06:23:42 -0800 (PST)
From: Tapomay Dey <tapo...@yahoo.com>
To: "developers-l...@monetdb.org" <developers-l...@monetdb.org>
Subject: group_concat
Message-ID:
        <1355408622.38959.yahoomail...@web114113.mail.gq1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

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@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://mail.monetdb.org/pipermail/developers-list/attachments/20121213/e27caa80/attachment.html>

------------------------------

Message: 2
Date: Thu, 13 Dec 2012 15:29:22 +0100 (CET)
From: Stefan Manegold <stefan.maneg...@cwi.nl>
To: "Communication channel for developers of the MonetDB suite."
        <developers-l...@monetdb.org>
Subject: Re: group_concat
Message-ID: <914474120.970434.1355408962059.javamail.r...@cwi.nl>
Content-Type: text/plain; charset=utf-8

Tapomay,

thanks for the enlightment!
Knowing what you are actually after helps us a lot to give you better advice 
how to approach your goal, than merely being able to answer individual specific 
questions without having/knowing the complete contexts.

I cannot quickly answer your question right now, but I have one more general 
comment / advice.

Not only is Mx to be phased out, but also the aggregation code structure in 
monetdb5/modules/kernel/aggr*.mx in the Oct2012 release branch is obsolete.

For a complete re-implementation of aggregation functions using a largely 
simplified coding style in plain C (rather than Mx) is available in 
monetdb5/modules/kernel/aggr.{c,mal{.sh}} in the Feb2013 release candidate 
branch and the default development branch.

You might also want to check that code for examples and inspiration.

Best,
Stefan

22:36:31 manegold@rome:/tmp $ cat /tmp/xyz 
Tapomay,

thanks for the enlightment!
Knowing what you are actually after helps us a lot to give you better advice 
how to approach your goal, than merely being able to answer individual specific 
questions without having/knowing the complete contexts.

Having said that, the aggregation code structure in 
monetdb5/modules/kernel/aggr*.mx in the Oct2012 release branch is also obsolete.

For a complete re-implementation of aggregations functions using a largely 
simplified coding style in plain C (rather than Mx) is available in 
monetdb5/modules/kernel/aggr.{c,mal{.sh}} in the Feb2013 release candidate 
branch and the default development branch.
Please check this code 

----- Original Message -----
> 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@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.
> _______________________________________________
> developers-list mailing list
> developers-l...@monetdb.org
> http://mail.monetdb.org/mailman/listinfo/developers-list
> 


------------------------------

_______________________________________________
developers-list mailing list
developers-l...@monetdb.org
http://mail.monetdb.org/mailman/listinfo/developers-list


End of developers-list Digest, Vol 4, Issue 11
**********************************************

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Monetdb-developers mailing list
Monetdb-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-developers

Reply via email to