code for primitives and operators

Hannes Mühleisen hannes.muehleisen at cwi.nl
Mon Dec 14 09:22:45 CET 2015


Hi,

> On 12 Dec 2015, at 23:25, Chenxi Li <spiritlcx at gmail.com> wrote:
> Could you tell me which files have the code for primitives and operators? Thanks a lot.

You can start with the EXPLAIN output for a query, for example

EXPLAIN SELECT * FROM TABLES;

You will see the MAL plan for this query, which contains for example the line 

|     C_191 := algebra.subselect(X_14,C_5,2,2,true,true,true);                                     |

This points to a MAL function, which is defined in the file algebra.mal, in particular the line 

command subselect(b:bat[:oid,:any_1], s:bat[:oid,:oid], low:any_1, high:any_1, li:bit, hi:bit, anti:bit) :bat[:oid,:oid]
address ALGsubselect2 …

address points to a C symbol, which is the function ALGsubselect2() in algebra.c

The same concept holds true for most functions in the MAL plan, they are defined in .mal files and point to C functions.

Hope this helps,

Hannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4127 bytes
Desc: not available
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20151214/4e2ee4d9/attachment.p7s>


More information about the developers-list mailing list