Changeset: d98dece8ba74 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d98dece8ba74 Added Files: monetdb5/modules/mal/Tests/mosaic_zone.mal monetdb5/modules/mal/Tests/mosaic_zone.stable.err monetdb5/modules/mal/Tests/mosaic_zone.stable.out monetdb5/modules/mal/Tests/mosaic_zone_joins.mal monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.err monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.out monetdb5/modules/mal/Tests/mosaic_zone_subselect.mal monetdb5/modules/mal/Tests/mosaic_zone_subselect.stable.err monetdb5/modules/mal/Tests/mosaic_zone_subselect.stable.out monetdb5/modules/mal/Tests/mosaic_zone_thetasubselect.mal monetdb5/modules/mal/Tests/mosaic_zone_thetasubselect.stable.err monetdb5/modules/mal/Tests/mosaic_zone_thetasubselect.stable.out monetdb5/modules/mal/mosaic_zone.h Modified Files: monetdb5/modules/mal/Tests/All monetdb5/modules/mal/mosaic.c monetdb5/modules/mal/mosaic_zone.c Branch: mosaic Log Message:
Finalizing the zone For the time being a single min/max pair is maintained. Further improvements should come from breaking the zone blocks based on the coverage of the underlying domain. diffs (truncated from 1471 to 300 lines): diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All --- a/monetdb5/modules/mal/Tests/All +++ b/monetdb5/modules/mal/Tests/All @@ -78,16 +78,19 @@ mosaic_none_double mosaic_none_subselect mosaic_rle_subselect mosaic_dict_subselect +mosaic_zone_subselect mosaic_mix_subselect mosaic_none_thetasubselect mosaic_rle_thetasubselect mosaic_dict_thetasubselect +mosaic_zone_thetasubselect mosaic_mix_thetasubselect mosaic_none_joins mosaic_rle_joins mosaic_dict_joins +mosaic_zone_joins mosaic_mix_joins #HAVE_RAPTOR?rdf diff --git a/monetdb5/modules/mal/Tests/mosaic_zone.mal b/monetdb5/modules/mal/Tests/mosaic_zone.mal new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/mosaic_zone.mal @@ -0,0 +1,12 @@ +#zone compression +b:= bat.new(:oid,:int); +bat.append(b,50); +bat.append(b,19531015); +bat.append(b,9); +b:= bat.append(b,b); + +io.print(b); +x:= mosaic.compress(b,"zone"); +mosaic.dump(x); +z:= mosaic.decompress(x); +io.print(z); diff --git a/monetdb5/modules/mal/Tests/mosaic_zone.stable.err b/monetdb5/modules/mal/Tests/mosaic_zone.stable.err new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/mosaic_zone.stable.err @@ -0,0 +1,30 @@ +stderr of test 'mosaic_zone` in directory 'monetdb5/modules/mal` itself: + + +# 17:24:13 > +# 17:24:13 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33832" "--set" "mapi_usock=/var/tmp/mtest-18516/.s.monetdb.33832" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal" "mosaic_zone.mal" +# 17:24:13 > + +# builtin opt gdk_dbpath = /export/scratch1/mk/mosaic//Linux/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 33832 +# cmdline opt mapi_usock = /var/tmp/mtest-18516/.s.monetdb.33832 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal +# cmdline opt gdk_debug = 536870922 + +# 17:24:13 > +# 17:24:13 > "Done." +# 17:24:13 > + diff --git a/monetdb5/modules/mal/Tests/mosaic_zone.stable.out b/monetdb5/modules/mal/Tests/mosaic_zone.stable.out new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/mosaic_zone.stable.out @@ -0,0 +1,72 @@ +stdout of test 'mosaic_zone` in directory 'monetdb5/modules/mal` itself: + + +# 17:24:13 > +# 17:24:13 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33832" "--set" "mapi_usock=/var/tmp/mtest-18516/.s.monetdb.33832" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal" "mosaic_zone.mal" +# 17:24:13 > + +# MonetDB 5 server v11.20.0 +# This is an unreleased version +# Serving database 'mTests_monetdb5_modules_mal', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 15.591 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:33832/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-18516/.s.monetdb.33832 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +function user.main():void; +#zone compression + b := bat.new(:oid,:int); + bat.append(b,50); + bat.append(b,19531015); + bat.append(b,9); + b := bat.append(b,b); + io.print(b); + x := mosaic.compress(b,"zone"); + mosaic.dump(x); + z := mosaic.decompress(x); + io.print(z); +end main; +#--------------------------# +# h t # name +# void int # type +#--------------------------# +[ 0@0, 50 ] +[ 1@0, 19531015 ] +[ 2@0, 9 ] +[ 3@0, 50 ] +[ 4@0, 19531015 ] +[ 5@0, 9 ] +#zone 1 elms [50 - 50] +#zone 2 elms [50 - 19531015] +#zone 3 elms [9 - 19531015] +#zone 4 elms [9 - 19531015] +#zone 5 elms [9 - 19531015] +#zone 6 elms [9 - 19531015] +#header block 20c7830 version 20140808 +#index top 1 +#[0] 6 144 +#blk type 5 todo 0 +#wins 0 0 0 0 0 1 +#elms 0 0 0 0 0 6 +#time 0 0 0 0 0 0 +#perc 0 0 0 0 0 100 +#zone 6 elms [9 - 19531015] +#--------------------------# +# h t # name +# void int # type +#--------------------------# +[ 0@0, 50 ] +[ 1@0, 19531015 ] +[ 2@0, 9 ] +[ 3@0, 50 ] +[ 4@0, 19531015 ] +[ 5@0, 9 ] + +# 17:24:13 > +# 17:24:13 > "Done." +# 17:24:13 > + diff --git a/monetdb5/modules/mal/Tests/mosaic_zone_joins.mal b/monetdb5/modules/mal/Tests/mosaic_zone_joins.mal new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/mosaic_zone_joins.mal @@ -0,0 +1,37 @@ +# Compression of noncompressable column + +b:= bat.new(:oid,:int); +bat.append(b,50); +bat.append(b,19531015); +bat.append(b,9); +b:= bat.append(b,b); + +io.print(b); +x:= mosaic.compress(b,"none"); + +c:= bat.new(:oid,:oid); +bat.append(c,0@0); +bat.append(c,2@0); +bat.append(c,5@0); +io.print(c); + +#mosaic.dump(x); +s:= algebra.leftfetchjoin(c,b); +io.print(s); +xs:= mosaic.leftfetchjoin(c,b); +io.print(xs); + +d:= bat.new(:oid,:int); +bat.append(d,9); +bat.append(d,11); +bat.append(d,nil:int); + +(jl,jr):= algebra.join(b,d); +io.print(jl,jr); +(ml,mr):= mosaic.join(x,d); +io.print(ml,mr); + +(jl,jr):= algebra.join(d,b); +io.print(jl,jr); +(ml,mr):= mosaic.join(d,x); +io.print(ml,mr); diff --git a/monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.err b/monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.err new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.err @@ -0,0 +1,30 @@ +stderr of test 'mosaic_zone_joins` in directory 'monetdb5/modules/mal` itself: + + +# 17:24:16 > +# 17:24:16 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33832" "--set" "mapi_usock=/var/tmp/mtest-18516/.s.monetdb.33832" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal" "mosaic_zone_joins.mal" +# 17:24:16 > + +# builtin opt gdk_dbpath = /export/scratch1/mk/mosaic//Linux/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 33832 +# cmdline opt mapi_usock = /var/tmp/mtest-18516/.s.monetdb.33832 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal +# cmdline opt gdk_debug = 536870922 + +# 17:24:16 > +# 17:24:16 > "Done." +# 17:24:16 > + diff --git a/monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.out b/monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.out new file mode 100644 --- /dev/null +++ b/monetdb5/modules/mal/Tests/mosaic_zone_joins.stable.out @@ -0,0 +1,119 @@ +stdout of test 'mosaic_zone_joins` in directory 'monetdb5/modules/mal` itself: + + +# 17:24:16 > +# 17:24:16 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33832" "--set" "mapi_usock=/var/tmp/mtest-18516/.s.monetdb.33832" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal" "mosaic_zone_joins.mal" +# 17:24:16 > + +# MonetDB 5 server v11.20.0 +# This is an unreleased version +# Serving database 'mTests_monetdb5_modules_mal', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 15.591 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:33832/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-18516/.s.monetdb.33832 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +function user.main():void; +# Compression of noncompressable column + b := bat.new(:oid,:int); + bat.append(b,50); + bat.append(b,19531015); + bat.append(b,9); + b := bat.append(b,b); + io.print(b); + x := mosaic.compress(b,"none"); + c := bat.new(:oid,:oid); + bat.append(c,0@0); + bat.append(c,2@0); + bat.append(c,5@0); + io.print(c); +#mosaic.dump(x); + s := algebra.leftfetchjoin(c,b); + io.print(s); + xs := mosaic.leftfetchjoin(c,b); + io.print(xs); + d := bat.new(:oid,:int); + bat.append(d,9); + bat.append(d,11); + bat.append(d,nil:int); + (jl,jr) := algebra.join(b,d); + io.print(jl,jr); + (ml,mr) := mosaic.join(x,d); + io.print(ml,mr); + (jl,jr) := algebra.join(d,b); + io.print(jl,jr); + (ml,mr) := mosaic.join(d,x); + io.print(ml,mr); +end main; +#--------------------------# +# h t # name +# void int # type +#--------------------------# +[ 0@0, 50 ] +[ 1@0, 19531015 ] +[ 2@0, 9 ] +[ 3@0, 50 ] +[ 4@0, 19531015 ] +[ 5@0, 9 ] +#header block 1bb60b0 version 20140808 +#index top 1 +#[0] 6 112 +#blk type 5 todo 0 +#wins 1 0 0 0 0 0 _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list