[Monetdb-developers] MonetDB: default - test opt_sql_append: trying to upgrade to new...

Martin Kersten Martin.Kersten at cwi.nl
Sat Feb 18 18:37:44 CET 2012


The new optimizer infrastructure returns the name of the pipe, not its 
content. The definitions can be obtained from the system view:

select * from optimizers();

can be used to get the expanded form.

On 2/18/12 6:11 PM, Stefan Manegold wrote:
> Changeset: 62a52aaf4241 for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=62a52aaf4241
> Modified Files:
> 	monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.sql
> 	monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
> Branch: default
> Log Message:
>
> test opt_sql_append: trying to upgrade to new optimizer framework
>
> However, setting SQL variable "optimizer" to a MAL snippert
> rather than an optimizer pipeline name does not seem to work (yet?) ...
>
>
> diffs (39 lines):
>
> diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.sql b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.sql
> --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.sql
> +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.sql
> @@ -1,7 +1,9 @@
>   create table ttt (a int, b int, c int);
>   select optimizer;
>   explain copy into ttt from '/tmp/xyz';
> -set optimizer = substring(optimizer,0,length(optimizer)-length('garbageCollector')) || 'sql_append,garbageCollector';
> +declare opt_pipe_name string; set opt_pipe_name = ( select optimizer );
> +declare opt_pipe_def  string; set opt_pipe_def  = ( select def from optimizers() where name = opt_pipe_name );
> +set optimizer = substring(opt_pipe_def,0,length(opt_pipe_def)-length('optimizer.garbageCollector();')) || 'optimizer.sql_append();optimizer.garbageCollector();';
>   select optimizer;
>   explain copy into ttt from '/tmp/xyz';
>   drop table ttt;
> diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
> --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
> +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out
> @@ -49,8 +49,8 @@ Ready.
>   % . # table_name
>   % single_value # name
>   % varchar # type
> -% 188 # length
> -[ "inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,accumulators,garbageCollector"	]
> +% 12 # length
> +[ "default_pipe"	]
>   #explain copy into ttt from '/tmp/xyz';
>   % .explain # table_name
>   % mal # name
> @@ -69,8 +69,8 @@ end s2_1;
>   % . # table_name
>   % single_value # name
>   % varchar # type
> -% 199 # length
> -[ "inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,accumulators,sql_append,garbageCollector"	]
> +% 452 # length
> +[ "optimizer.inline();optimizer.remap();optimizer.evaluate();optimizer.costModel();optimizer.coercions();optimizer.emptySet();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.commonTerms();optimizer.joinPath();optimizer.reorder();optimizer.deadcode();optimizer.reduce();optimizer.dataflow();optimizer.history();optimizer.multiplex();optimizer.accumulators();optimizer.sql_append();optimizer.garbageCollector();"	]
>   #explain copy into ttt from '/tmp/xyz';
>   % .explain # table_name
>   % mal # name
> _______________________________________________
> Checkin-list mailing list
> Checkin-list at monetdb.org
> http://mail.monetdb.org/mailman/listinfo/checkin-list




More information about the developers-list mailing list