|
|
|||
1.73 MonetDB Assembly Language (MAL)The target language for a query compiler is the MonetDB Assembly Language (MAL). It was designed to ease code generation and fast interpretation by the server. The compiler produces algebraic query plans, which are turned into physical execution plans by the MAL optimizers. The output of a compiler is either an ascii representation of the MAL program or the compiler is tightly coupled with the server to save parsing and communication overhead. A snippet of the MAL code produced by the SQL compiler for the query select count(*) from tables is shown below. It illustrates a sequences of relational operations against a table column and producing a partial result. ...
_22:bat[:oid,:oid] := sql.bind_dbat("tmp","_tables",0);
_23 := bat.reverse(_22);
_24 := algebra.kdifference(_20,_23);
_25 := algebra.markT(_24,0:oid);
_26 := bat.reverse(_25);
_27 := algebra.join(_26,_20);
_28 := bat.setWriteMode(_19);
bat.append(_28,_27,true);
...
MAL supports the full breadth of computational paradigms deployed in a database setting. It is language framework where the execution semantics is determined by the code transformations and the final engine choosen. The design and implementation of MAL takes the functionality offered previously a significant step further. To name a few:
|
||||
| © 1994-2011 CWI | Contact us Legal HG web Bugs TestWeb | |||