[Monetdb-developers] [Monetdb-checkins] MonetDB5/src/compiler/Tests All, , NONE, 1.1 mal01.mal, , NONE, 1.1 mal01.stable.err, , NONE, 1.1 mal01.stable.out, , NONE, 1.1 sql01.mal, , NONE, 1.1 sql01.stable.err, , NONE, 1.1 sql01.stable.out, , NONE, 1.1

Stefan Manegold Stefan.Manegold at cwi.nl
Tue Oct 9 09:50:59 CEST 2007


On Sun, Oct 07, 2007 at 06:44:57AM +0000, Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/compiler/Tests
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1743/Tests
> 
> Added Files:
> 	All mal01.mal mal01.stable.err mal01.stable.out sql01.mal 
> 	sql01.stable.err sql01.stable.out 
> Log Message:
> Patching some very old code to bring it closer to reality.
> The examples roughly indicate the code to be considered for inclusion
> in a compiled plan. The expected gain is only 25-50% interpreter overhead,
> which result from known argument locations and stack initialization actions.
> A real optimizing MAL ->C compiler should weave instructions to
> more efficient ones, e.g. dropping intermediates.
> 
> The SQL version highlights, however, the calls needed against the BBP
> due to the shared bat assumption.
> 
> 
[...]
> --- NEW FILE: sql01.mal ---
> include sql;
          ^^^
This test is bound to fail here (i.e., in MonetDB5) as there is no module
"sql" in MonetDB5; module "sql" is only provided by sql.

Stefan

> #sql.compiler("sql01","select * from tables;");
> include mal_compiler;
> function user.qry():void;
>     T1:bat[:oid,:int]{notnil=true,rows=0:lng,bid=113}  := sql.bind("tmp","Ttables","id",0);
>     constraints.emptySet(T1);
>     T10:bat[:oid,:sht]{notnil=true,rows=0:lng,bid=117}  := sql.bind("tmp","Ttables","type",0);
>     T13:bat[:oid,:int]{notnil=true,rows=30:lng,bid=67}  := sql.bind("sys","Ttables","id",0);
>     T15:bat[:oid,:int]{notnil=true,rows=0:lng,bid=307}  := sql.bind("sys","Ttables","id",1);
>     constraints.emptySet(T15);
>     T15:bat[:oid,:int]{notnil=true,rows=0:lng,bid=307}  := nil;
>     T16:bat[:oid,:int]{notnil=true,rows=0:lng,bid=309}  := sql.bind("sys","Ttables","id",2);
>     constraints.emptySet(T16);
>     T16:bat[:oid,:int]{notnil=true,rows=0:lng,bid=309}  := nil;
>     T20:bat[:oid,:sht]{notnil=true,rows=30:lng,bid=71}  := sql.bind("sys","Ttables","type",0);
>     T39:bat[:oid,:str]{notnil=true,rows=0:lng,bid=114}  := sql.bind("tmp","Ttables","name",0);
>     T42:bat[:oid,:str]{notnil=true,rows=30:lng,bid=68}  := sql.bind("sys","Ttables","name",0);
>     T47:bat[:oid,:int]{notnil=true,rows=0:lng,bid=115}  := sql.bind("tmp","Ttables","schemaTid",0);
>     T50:bat[:oid,:int]{notnil=true,rows=30:lng,bid=69}  := sql.bind("sys","Ttables","schemaTid",0);
>     T55:bat[:oid,:str]{notnil=true,rows=0:lng,bid=116}  := sql.bind("tmp","Ttables","query",0);
>     T58:bat[:oid,:str]{notnil=true,rows=30:lng,bid=70}  := sql.bind("sys","Ttables","query",0);
>     T64:bat[:oid,:bit]{notnil=true,rows=0:lng,bid=118}  := sql.bind("tmp","Ttables","system",0);
>     T67:bat[:oid,:bit]{notnil=true,rows=30:lng,bid=72}  := sql.bind("sys","Ttables","system",0);
>     T72:bat[:oid,:sht]{notnil=true,rows=0:lng,bid=119}  := sql.bind("tmp","Ttables","commitTaction",0);
>     T75:bat[:oid,:sht]{notnil=true,rows=30:lng,bid=73}  := sql.bind("sys","Ttables","commitTaction",0);
>     T8{rows=0:lng} := algebra.markT(T1,0 at 0);
>     T9{rows=0:lng} := bat.reverse(T8);
>     T8{rows=0:lng} := nil;
>     T12{rows=0:lng} := algebra.join(T9,T10);
>     T10:bat[:oid,:sht]{notnil=true,rows=0:lng,bid=117}  := nil;
>     T18{rows=30:lng} := algebra.markT(T13,0 at 0);
>     T19{rows=30:lng} := bat.reverse(T18);
>     T18{rows=30:lng} := nil;
>     T21{rows=30:lng} := algebra.join(T19,T20);
>     T20:bat[:oid,:sht]{notnil=true,rows=30:lng,bid=71}  := nil;
>     T22{rows=31:lng} := bat.setWriteMode(T21);
>     T21{rows=30:lng} := nil;
>     bat.append(T22,T12,true);
>     T12{rows=0:lng} := nil;
>     T26{rows=31:lng} := algebra.uselect(T22,nil:sht,2:sht,false,false);
>     T29{rows=31:lng} := algebra.markT(T26,0 at 0);
>     T26{rows=31:lng} := nil;
>     T30{rows=31:lng} := bat.reverse(T29);
>     T29{rows=31:lng} := nil;
>     T31{rows=0:lng} := algebra.join(T9,T1);
>     T1:bat[:oid,:int]{notnil=true,rows=0:lng,bid=113}  := nil;
>     T32{rows=30:lng} := algebra.join(T19,T13);
>     T13:bat[:oid,:int]{notnil=true,rows=30:lng,bid=67}  := nil;
>     T33{rows=31:lng} := bat.setWriteMode(T32);
>     T32{rows=30:lng} := nil;
>     bat.append(T33,T31,true);
>     T31{rows=0:lng} := nil;
>     T35{rows=31:lng} := algebra.join(T30,T33);
>     T36{rows=31:lng} := algebra.markT(T35,0 at 0);
>     T35{rows=31:lng} := nil;
>     T37{rows=31:lng} := bat.reverse(T36);
>     T36{rows=31:lng} := nil;
>     T38{rows=31:lng} := algebra.joinPath(T37,T30,T33);
>     T33{rows=31:lng} := nil;
>     T41{rows=0:lng} := algebra.join(T9,T39);
>     T39:bat[:oid,:str]{notnil=true,rows=0:lng,bid=114}  := nil;
>     T43{rows=30:lng} := algebra.join(T19,T42);
>     T42:bat[:oid,:str]{notnil=true,rows=30:lng,bid=68}  := nil;
>     T44{rows=31:lng} := bat.setWriteMode(T43);
>     T43{rows=30:lng} := nil;
>     bat.append(T44,T41,true);
>     T41{rows=0:lng} := nil;
>     T46{rows=31:lng} := algebra.joinPath(T37,T30,T44);
>     T44{rows=31:lng} := nil;
>     T49{rows=0:lng} := algebra.join(T9,T47);
>     T47:bat[:oid,:int]{notnil=true,rows=0:lng,bid=115}  := nil;
>     T51{rows=30:lng} := algebra.join(T19,T50);
>     T50:bat[:oid,:int]{notnil=true,rows=30:lng,bid=69}  := nil;
>     T52{rows=31:lng} := bat.setWriteMode(T51);
>     T51{rows=30:lng} := nil;
>     bat.append(T52,T49,true);
>     T49{rows=0:lng} := nil;
>     T54{rows=31:lng} := algebra.joinPath(T37,T30,T52);
>     T52{rows=31:lng} := nil;
>     T57{rows=0:lng} := algebra.join(T9,T55);
>     T55:bat[:oid,:str]{notnil=true,rows=0:lng,bid=116}  := nil;
>     T59{rows=30:lng} := algebra.join(T19,T58);
>     T58:bat[:oid,:str]{notnil=true,rows=30:lng,bid=70}  := nil;
>     T60{rows=31:lng} := bat.setWriteMode(T59);
>     T59{rows=30:lng} := nil;
>     bat.append(T60,T57,true);
>     T57{rows=0:lng} := nil;
>     T62{rows=31:lng} := algebra.joinPath(T37,T30,T60);
>     T60{rows=31:lng} := nil;
>     T63{rows=31:lng} := algebra.joinPath(T37,T30,T22);
>     T22{rows=31:lng} := nil;
>     T66{rows=0:lng} := algebra.join(T9,T64);
>     T64:bat[:oid,:bit]{notnil=true,rows=0:lng,bid=118}  := nil;
>     T68{rows=30:lng} := algebra.join(T19,T67);
>     T67:bat[:oid,:bit]{notnil=true,rows=30:lng,bid=72}  := nil;
>     T69{rows=31:lng} := bat.setWriteMode(T68);
>     T68{rows=30:lng} := nil;
>     bat.append(T69,T66,true);
>     T66{rows=0:lng} := nil;
>     T71{rows=31:lng} := algebra.joinPath(T37,T30,T69);
>     T69{rows=31:lng} := nil;
>     T74{rows=0:lng} := algebra.join(T9,T72);
>     T72:bat[:oid,:sht]{notnil=true,rows=0:lng,bid=119}  := nil;
>     T76{rows=30:lng} := algebra.join(T19,T75);
>     T75:bat[:oid,:sht]{notnil=true,rows=30:lng,bid=73}  := nil;
>     T77{rows=31:lng} := bat.setWriteMode(T76);
>     T76{rows=30:lng} := nil;
>     bat.append(T77,T74,true);
>     T74{rows=0:lng} := nil;
>     T79{rows=31:lng} := algebra.joinPath(T37,T30,T77);
>     T77{rows=31:lng} := nil;
>     T81{rows=0:lng} := algebra.project(T9,1);
>     T9{rows=0:lng} := nil;
>     T83{rows=30:lng} := algebra.project(T19,0);
>     T19{rows=30:lng} := nil;
>     T84{rows=31:lng} := bat.setWriteMode(T83);
>     T83{rows=30:lng} := nil;
>     bat.append(T84,T81,true);
>     T81{rows=0:lng} := nil;
>     T86{rows=31:lng} := algebra.joinPath(T37,T30,T84);
>     T37{rows=31:lng} := nil;
>     T30{rows=31:lng} := nil;
>     T84{rows=31:lng} := nil;
>     T87 := sql.resultSet(8,1,T38);
>     sql.rsColumn(T87,"sys.tables","id","int",32,0,T38);
>     T38{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","name","varchar",1024,0,T46);
>     T46{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","schemaTid","int",32,0,T54);
>     T54{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","query","varchar",2048,0,T62);
>     T62{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","type","smallint",16,0,T63);
>     T63{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","system","boolean",1,0,T71);
>     T71{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","commitTaction","smallint",16,0,T79);
>     T79{rows=31:lng} := nil;
>     sql.rsColumn(T87,"sys.tables","temporary","tinyint",8,0,T86);
>     T86{rows=31:lng} := nil;
>     sql.exportResult(T87,"");
> end qry;
> compiler.MALtoC("user","qry","sql01");

-- 
| Dr. Stefan Manegold | mailto:Stefan.Manegold at cwi.nl |
| CWI,  P.O.Box 94079 | http://www.cwi.nl/~manegold/  |
| 1090 GB Amsterdam   | Tel.: +31 (20) 592-4212       |
| The Netherlands     | Fax : +31 (20) 592-4312       |




More information about the developers-list mailing list