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. MX file expansion (Tapomay Dey)
   2. Re: MX file expansion (Stefan Manegold)
   3. Re: MX file expansion (Fabian Groffen)
   4. Re: MX file expansion (Stefan Manegold)
   5. Re: MX file expansion (Tapomay Dey)


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

Message: 1
Date: Wed, 12 Dec 2012 07:18:10 -0800 (PST)
From: Tapomay Dey <tapo...@yahoo.com>
To: "developers-l...@monetdb.org" <developers-l...@monetdb.org>
Subject: MX file expansion
Message-ID:
        <1355325490.9171.yahoomail...@web114103.mail.gq1.yahoo.com>
Content-Type: text/plain; charset="us-ascii"

How do I generate the sources from a new mx file.

Thanks and Regards,
Tapomay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.monetdb.org/pipermail/developers-list/attachments/20121212/6078cef8/attachment.html>

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

Message: 2
Date: Wed, 12 Dec 2012 16:24:04 +0100 (CET)
From: Stefan Manegold <stefan.maneg...@cwi.nl>
To: "Communication channel for developers of the MonetDB suite."
        <developers-l...@monetdb.org>
Subject: Re: MX file expansion
Message-ID: <593254234.915309.1355325844940.javamail.r...@cwi.nl>
Content-Type: text/plain; charset=utf-8

Like any other source file: use you favorite text editor.

Stefan

----- Original Message -----
> How do I generate the sources from a new mx file.
> 
> Thanks and Regards,
> Tapomay
> _______________________________________________
> developers-list mailing list
> developers-l...@monetdb.org
> http://mail.monetdb.org/mailman/listinfo/developers-list
> 


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

Message: 3
Date: Wed, 12 Dec 2012 16:24:59 +0100
From: Fabian Groffen <fab...@monetdb.org>
To: Tapomay Dey <tapo...@yahoo.com>
Cc: "developers-l...@monetdb.org" <developers-l...@monetdb.org>
Subject: Re: MX file expansion
Message-ID: <20121212152459.gt8...@cwi.nl>
Content-Type: text/plain; charset="utf-8"

On 12-12-2012 07:18:10 -0800, Tapomay Dey wrote:
> How do I generate the sources from a new mx file.

We strongly discourage people adding new .mx files.  Just use normal .c,
.h and .mal files.


-- 
Fabian Groffen                              fab...@monetdb.org
column-store developer             http://www.monetdb.org/Home
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: Digital signature
URL: 
<http://mail.monetdb.org/pipermail/developers-list/attachments/20121212/c23d544f/attachment.sig>

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

Message: 4
Date: Wed, 12 Dec 2012 16:44:53 +0100 (CET)
From: Stefan Manegold <stefan.maneg...@cwi.nl>
To: "Communication channel for developers of the MonetDB suite."
        <developers-l...@monetdb.org>
Subject: Re: MX file expansion
Message-ID: <1408104044.916773.1355327093539.javamail.r...@cwi.nl>
Content-Type: text/plain; charset=utf-8

Please ignore my comment; I wrongly read "for" instead of "from".
Sorry.

Fabian's comment stands:

Mx is deprecated and should (must) no longer be used (surely if you're not 
familiar with it).
(New) source should (must) be in plain .h, .c, etc. files, not in .mx files.

Stefan

----- Original Message -----
> Like any other source file: use you favorite text editor.
> 
> Stefan
> 
> ----- Original Message -----
> > How do I generate the sources from a new mx file.
> > 
> > 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
> 


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

Message: 5
Date: Wed, 12 Dec 2012 08:04:54 -0800 (PST)
From: Tapomay Dey <tapo...@yahoo.com>
To: "developers-l...@monetdb.org" <developers-l...@monetdb.org>
Subject: Re: MX file expansion
Message-ID:
        <1355328294.47087.yahoomail...@web114118.mail.gq1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,
Thanks for the guidance.
Justification: I am trying to add group_concat support. 
(http://www.mysqlperformanceblog.com/2006/09/04/group_concat-useful-group-by-extension/)
Tried to follow the string reverse example using UDF. But got stuck while 
trying to figure out the semantics of accessing the group-related BATs returned 
by "group.done" MAL call(ref: explain <group by query>).
This took me to the aggr module implementation in /monetdb5/modules/kernel.
Did some reverse engineering to figure out that the 15K lines of code in the C 
sources were not hand-written but generated from the mx :).

Also the aggregation algorithms handle a lot of bat access cases (like?head or 
tail bats being dense etc.) and some lookup cases like void/scan/merge/hash 
lookup etc. I have no knowledge about their internals, but I didn't want to end 
up with an incomplete implementation.

As I am completely new to the semantics and policies of BAT access I decided to 
refer aggr_bge_avg and came up with the attached mx for reference.
Also I am still planning to define it as a UDF and internally make a call to 
the generated function in kernel module. Not sure if that's possible just by 
including the generated header in the UDF source.


If you still discourage this approach,?
Is it fine if I ignore the above discussed cases and go for a simpler 
implementation(what should I refer for the same?).
One solution (simpler) could be to extract the most common case from the 
generated C sources of average function.


Attached the mx for reference. Its a two-pass approach where in first pass we 
calculate the string lengths required per group and in second pass we allocate 
memory for the destination and strcat the strings into destination.
Please note that the attached file may still be logically incomplete but the 
basic changes are in place. Need to test before finalizing.
Thanks again and Regards,
Tapomay.


________________________________
 From: Fabian Groffen <fab...@monetdb.org>
To: Tapomay Dey <tapo...@yahoo.com> 
Cc: "developers-l...@monetdb.org" <developers-l...@monetdb.org> 
Sent: Wednesday, December 12, 2012 8:54 PM
Subject: Re: MX file expansion
 
On 12-12-2012 07:18:10 -0800, Tapomay Dey wrote:
> How do I generate the sources from a new mx file.

We strongly discourage people adding new .mx files.? Just use normal .c,
.h and .mal files.


-- 
Fabian Groffen? ? ? ? ? ? ? ? ? ? ? ? ? ? ? fab...@monetdb.org
column-store developer? ? ? ? ? ?  http://www.monetdb.org/Home
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.monetdb.org/pipermail/developers-list/attachments/20121212/8f91c762/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aggr_bge_concat.mx
Type: application/octet-stream
Size: 9329 bytes
Desc: not available
URL: 
<http://mail.monetdb.org/pipermail/developers-list/attachments/20121212/8f91c762/attachment.obj>

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

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


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

------------------------------------------------------------------------------
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