code for primitives and operators

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


> On 12 Dec 2015, at 23:25, Chenxi Li <spiritlcx at> 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


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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4127 bytes
Desc: not available
URL: <>

More information about the developers-list mailing list