Changeset: af01c321bcd7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=af01c321bcd7
Added Files:
        monetdb5/modules/mal/Tests/mosaic_linear.mal
        monetdb5/modules/mal/Tests/mosaic_linear.stable.err
        monetdb5/modules/mal/Tests/mosaic_linear.stable.out
        monetdb5/modules/mal/Tests/mosaic_linear_joins.mal
        monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.err
        monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.out
        monetdb5/modules/mal/Tests/mosaic_linear_subselect.mal
        monetdb5/modules/mal/Tests/mosaic_linear_thetasubselect.mal
        monetdb5/modules/mal/Tests/mosaic_linear_thetasubselect.stable.err
        monetdb5/modules/mal/Tests/mosaic_linear_thetasubselect.stable.out
        monetdb5/modules/mal/mosaic_linear.c
        monetdb5/modules/mal/mosaic_linear.h
Modified Files:
        monetdb5/modules/mal/Makefile.ag
        monetdb5/modules/mal/Tests/All
        monetdb5/modules/mal/mosaic.c
        monetdb5/modules/mal/mosaic.h
        monetdb5/modules/mal/mosaic_rle.c
Branch: mosaic
Log Message:

Linear model compression scheme


diffs (truncated from 1671 to 300 lines):

diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -69,6 +69,7 @@ lib_mal = {
                mosaic_dict.c mosaic_dict.h \
                mosaic_zone.c mosaic_zone.h \
                mosaic_delta.c mosaic_delta.h \
+               mosaic_linear.c mosaic_linear.h \
                calc.c batcalc.c
 }
 
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
@@ -73,6 +73,7 @@ mosaic_mix
 mosaic_dict
 mosaic_zone
 mosaic_delta
+mosaic_linear
 
 mosaic_none_double
 
@@ -81,6 +82,7 @@ mosaic_rle_subselect
 mosaic_dict_subselect
 mosaic_zone_subselect
 mosaic_delta_subselect
+mosaic_linear_subselect
 mosaic_mix_subselect
 
 mosaic_none_thetasubselect
@@ -88,6 +90,7 @@ mosaic_rle_thetasubselect
 mosaic_dict_thetasubselect
 mosaic_zone_thetasubselect
 mosaic_delta_thetasubselect
+mosaic_linear_thetasubselect
 mosaic_mix_thetasubselect
 
 mosaic_none_joins
@@ -95,6 +98,7 @@ mosaic_rle_joins
 mosaic_dict_joins
 mosaic_zone_joins
 mosaic_delta_joins
+mosaic_linear_joins
 mosaic_mix_joins
 
 #HAVE_RAPTOR?rdf
diff --git a/monetdb5/modules/mal/Tests/mosaic_linear.mal 
b/monetdb5/modules/mal/Tests/mosaic_linear.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_linear.mal
@@ -0,0 +1,22 @@
+# Range compressions
+
+
+b:= bat.new(:oid,:int);
+bat.append(b,0);
+bat.append(b,2);
+bat.append(b,4);
+bat.append(b,6);
+bat.append(b,8);
+bat.append(b,10);
+bat.append(b,1);
+bat.append(b,4);
+bat.append(b,7);
+bat.append(b,10);
+bat.append(b,13);
+bat.append(b,16);
+
+io.print(b);
+x:= mosaic.compress(b,"linear");
+#mosaic.dump(x);
+z:= mosaic.decompress(x);
+io.print(z);
diff --git a/monetdb5/modules/mal/Tests/mosaic_linear.stable.err 
b/monetdb5/modules/mal/Tests/mosaic_linear.stable.err
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_linear.stable.err
@@ -0,0 +1,30 @@
+stderr of test 'mosaic_linear` in directory 'monetdb5/modules/mal` itself:
+
+
+# 15:12:48 >  
+# 15:12:48 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32601" "--set" 
"mapi_usock=/var/tmp/mtest-15971/.s.monetdb.32601" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal"
 "mosaic_linear.mal"
+# 15:12:48 >  
+
+# 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 = 32601
+# cmdline opt  mapi_usock = /var/tmp/mtest-15971/.s.monetdb.32601
+# 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
+
+# 15:12:48 >  
+# 15:12:48 >  "Done."
+# 15:12:48 >  
+
diff --git a/monetdb5/modules/mal/Tests/mosaic_linear.stable.out 
b/monetdb5/modules/mal/Tests/mosaic_linear.stable.out
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_linear.stable.out
@@ -0,0 +1,91 @@
+stdout of test 'mosaic_linear` in directory 'monetdb5/modules/mal` itself:
+
+
+# 15:12:48 >  
+# 15:12:48 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32601" "--set" 
"mapi_usock=/var/tmp/mtest-15971/.s.monetdb.32601" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal"
 "mosaic_linear.mal"
+# 15:12:48 >  
+
+# 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:32601/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-15971/.s.monetdb.32601
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+function user.main():void;
+# Range compressions 
+    b := bat.new(:oid,:int);
+    bat.append(b,0);
+    bat.append(b,2);
+    bat.append(b,4);
+    bat.append(b,6);
+    bat.append(b,8);
+    bat.append(b,10);
+    bat.append(b,1);
+    bat.append(b,4);
+    bat.append(b,7);
+    bat.append(b,10);
+    bat.append(b,13);
+    bat.append(b,16);
+    io.print(b);
+    x := mosaic.compress(b,"linear");
+#mosaic.dump(x); 
+    z := mosaic.decompress(x);
+    io.print(z);
+end main;
+#--------------------------#
+# h    t  # name
+# void int  # type
+#--------------------------#
+[ 0@0, 0  ]
+[ 1@0, 2  ]
+[ 2@0, 4  ]
+[ 3@0, 6  ]
+[ 4@0, 8  ]
+[ 5@0, 10  ]
+[ 6@0, 1  ]
+[ 7@0, 4  ]
+[ 8@0, 7  ]
+[ 9@0, 10  ]
+[ 10@0,        13  ]
+[ 11@0,        16  ]
+#estimate linear 6 elm 33 perc
+#header block 2bfd830 version 20140808
+#index top 1
+#[0] 6 96
+#estimate linear 6 elm 33 perc
+#header block 2bfd830 version 20140808
+#index top 2
+#[0] 6 96
+#[1] 12 144
+#blk  type zone todo 0
+#wins 0 0 0 0 2 0 
+#elms 0 0 0 0 12 0 
+#time 0 0 0 0 489948 0 
+#perc 0 0 0 0 100 0 
+#--------------------------#
+# h    t  # name
+# void int  # type
+#--------------------------#
+[ 0@0, 0  ]
+[ 1@0, 2  ]
+[ 2@0, 4  ]
+[ 3@0, 6  ]
+[ 4@0, 8  ]
+[ 5@0, 10  ]
+[ 6@0, 1  ]
+[ 7@0, 4  ]
+[ 8@0, 7  ]
+[ 9@0, 10  ]
+[ 10@0,        13  ]
+[ 11@0,        16  ]
+
+# 15:12:48 >  
+# 15:12:48 >  "Done."
+# 15:12:48 >  
+
diff --git a/monetdb5/modules/mal/Tests/mosaic_linear_joins.mal 
b/monetdb5/modules/mal/Tests/mosaic_linear_joins.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_linear_joins.mal
@@ -0,0 +1,48 @@
+# Linear range compressions
+
+b:= bat.new(:oid,:int);
+bat.append(b,0);
+bat.append(b,2);
+bat.append(b,4);
+bat.append(b,6);
+bat.append(b,8);
+bat.append(b,10);
+bat.append(b,1);
+bat.append(b,4);
+bat.append(b,7);
+bat.append(b,10);
+bat.append(b,13);
+bat.append(b,16);
+
+io.print(b);
+x:= mosaic.compress(b,"linear");
+#mosaic.dump(x);
+z:= mosaic.decompress(x);
+io.print(z);
+
+c:= bat.new(:oid,:oid);
+bat.append(c,0@0);
+bat.append(c,2@0);
+bat.append(c,4@0);
+io.print(c);
+
+#mosaic.dump(x);
+s:= algebra.leftfetchjoin(c,b);
+io.print(s);
+xs:= mosaic.leftfetchjoin(c,x);
+io.print(xs);
+
+d:= bat.new(:oid,:int);
+bat.append(d,4);
+bat.append(d,13);
+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_linear_joins.stable.err 
b/monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.err
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.err
@@ -0,0 +1,30 @@
+stderr of test 'mosaic_linear_joins` in directory 'monetdb5/modules/mal` 
itself:
+
+
+# 15:12:53 >  
+# 15:12:53 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32601" "--set" 
"mapi_usock=/var/tmp/mtest-15971/.s.monetdb.32601" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/mk/mosaic//Linux/var/MonetDB/mTests_monetdb5_modules_mal"
 "mosaic_linear_joins.mal"
+# 15:12:53 >  
+
+# 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 = 32601
+# cmdline opt  mapi_usock = /var/tmp/mtest-15971/.s.monetdb.32601
+# 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
+
+# 15:12:53 >  
+# 15:12:53 >  "Done."
+# 15:12:53 >  
+
diff --git a/monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.out 
b/monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.out
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/mosaic_linear_joins.stable.out
@@ -0,0 +1,162 @@
+stdout of test 'mosaic_linear_joins` in directory 'monetdb5/modules/mal` 
itself:
+
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to