Changeset: 2f251c2486a3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f251c2486a3
Modified Files:
        monetdb5/modules/mal/extensions.c
        monetdb5/modules/mal/remote.c
Branch: headless
Log Message:

Merge with default branch.


diffs (truncated from 995 to 300 lines):

diff --git a/clients/python/setup.py b/clients/python/setup.py
--- a/clients/python/setup.py
+++ b/clients/python/setup.py
@@ -20,7 +20,7 @@
 from distutils.core import setup
 
 setup(name='python-monetdb',
-      version='1.0',
+      version='11.4.0',
       description='Native MonetDB client Python API',
       long_description='''\
 MonetDB is a database management system that is developed from a
@@ -35,6 +35,6 @@
       author_email='[email protected]',
       url='http://monetdb.cwi.nl/',
       packages=['monetdb', 'monetdb.sql'],
-      download_url='<will be filled in before a 
release>/python-monetdb-1.0.tar.gz',
+      download_url='<will be filled in before a 
release>/python-monetdb-11.4.0.tar.gz',
      )
 
diff --git a/monetdb5/modules/mal/Tests/remote08.mal 
b/monetdb5/modules/mal/Tests/remote08.mal
--- a/monetdb5/modules/mal/Tests/remote08.mal
+++ b/monetdb5/modules/mal/Tests/remote08.mal
@@ -8,9 +8,21 @@
 
 b := bat.insert(b, nil:oid, 2);
 b := bat.insert(b, nil:oid, 4);
+b := bat.insert(b, nil:oid, 6);
+b := bat.delete(b, nil:oid, 2);
 b := algebra.markH(b);
+
 rb2 := remote.put(conn1, b);
+lb2:bat[:oid,:int] := remote.get(conn1, rb2);
 
+io.print(lb2);
+
+b := bat.insert(b, nil:oid, 8);
+b := bat.insert(b, nil:oid, 10);
+b := algebra.slice(b, 1, 2);
+b := algebra.markH(b);
+
+rb2 := remote.put(conn1, b);
 lb2:bat[:oid,:int] := remote.get(conn1, rb2);
 
 io.print(lb2);
diff --git a/monetdb5/modules/mal/Tests/remote08.stable.out 
b/monetdb5/modules/mal/Tests/remote08.stable.out
--- a/monetdb5/modules/mal/Tests/remote08.stable.out
+++ b/monetdb5/modules/mal/Tests/remote08.stable.out
@@ -23,6 +23,15 @@
     b := bat.new(:oid,:int);
     b := bat.insert(b,nil:oid,2);
     b := bat.insert(b,nil:oid,4);
+    b := bat.insert(b,nil:oid,6);
+    b := bat.delete(b,nil:oid,2);
+    b := algebra.markH(b);
+    rb2 := remote.put(conn1,b);
+    lb2:bat[:oid,:int]  := remote.get(conn1,rb2);
+    io.print(lb2);
+    b := bat.insert(b,nil:oid,8);
+    b := bat.insert(b,nil:oid,10);
+    b := algebra.slice(b,1,2);
     b := algebra.markH(b);
     rb2 := remote.put(conn1,b);
     lb2:bat[:oid,:int]  := remote.get(conn1,rb2);
@@ -35,8 +44,14 @@
 # h    t         # name
 # void int       # type
 #-----------------#
-[ 0@0,   2       ]
+[ 0@0,   6       ]
 [ 1@0,   4       ]
+#-----------------#
+# h    t         # name
+# void int       # type
+#-----------------#
+[ 0@0,   4       ]
+[ 1@0,   8       ]
 
 # 13:26:30 >  
 # 13:26:30 >  Done.
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -1033,7 +1033,7 @@
                mnstr_write(cntxt->fdout, /* theap */
                                b->vheap->base,
                                b->vheap->free, 1);
-       mnstr_flush(cntxt->fdout);
+       /* flush is done by the calling environment (MAL) */
 
        return(MAL_SUCCEED);
 }
@@ -1051,6 +1051,7 @@
        bincol bb = { 0, 0, 0, 0, 0, 0 };
        char *nme = NULL;
        char *val = NULL;
+       char tmp;
 
        COL *b;
 
@@ -1060,7 +1061,7 @@
 
        /* could skip whitespace, but we just don't allow that */
        if (*hdr++ != '{')
-               throw(MAL, "remote.bincopyfrom", "illegal input, not a JSON 
header");
+               throw(MAL, "remote.bincopyfrom", "illegal input, not a JSON 
header (got '%s')", hdr - 1);
        while (*hdr != '\0') {
                switch (*hdr) {
                        case '"':
@@ -1119,6 +1120,11 @@
                b->vheap->free = bb.theapsize;
        }
 
+       /* read blockmode flush */
+       while (mnstr_read(in, &tmp, 1, 1) != 0) {
+               mnstr_printf(GDKout, "!MALexception:remote.bincopyfrom: 
expected flush, got: %c", tmp);
+       }
+
        *ret = b;
        return(MAL_SUCCEED);
 }
diff --git a/sql/backends/monet5/datacell/50_datacell.sql 
b/sql/backends/monet5/datacell/50_datacell.sql
--- a/sql/backends/monet5/datacell/50_datacell.sql
+++ b/sql/backends/monet5/datacell/50_datacell.sql
@@ -25,10 +25,10 @@
    external name datacell.inventory;
 
 create procedure datacell.receptor(tbl string, host string, portid integer)
-    external name receptor."start";
+    external name datacell.receptor;
 
 create procedure datacell.emitter(tbl string, host string, portid integer)
-    external name emitter."start";
+    external name datacell.emitter;
 
 create procedure datacell.mode(tbl string, mode string)
        external name datacell.mode;
diff --git a/sql/backends/monet5/datacell/Tests/scenario00.sql 
b/sql/backends/monet5/datacell/Tests/scenario00.sql
--- a/sql/backends/monet5/datacell/Tests/scenario00.sql
+++ b/sql/backends/monet5/datacell/Tests/scenario00.sql
@@ -1,6 +1,7 @@
 -- Scenario to exercise the datacell implementation
 -- using a single receptor and emitter
 -- The sensor data is simple passed to the actuator.
+-- it is closest to the web description
 
 set optimizer='datacell_pipe';
 
@@ -9,44 +10,25 @@
     tag timestamp,
     payload integer
 );
-create table datacell.bsktout( like datacell.bsktin);
+create table datacell.bsktout (like datacell.bsktin);
 
--- initialize the baskets
--- call datacell.prelude();
-call datacell.basket('datacell.bsktin');
-call datacell.basket('datacell.bsktout');
+call datacell.receptor('datacell.bsktin','localhost',50500);
 
--- initialize receptor
-call datacell.receptor('datacell.bsktin','localhost',50500);
-call datacell.mode('datacell.bsktin','passive');
-call datacell.protocol('datacell.bsktin','udp');
-call datacell.resume('datacell.bsktin');
+call datacell.emitter('datacell.bsktout','localhost',50600);
 
--- externally, activate the sensor leaving some in the basket
+call datacell.query('datacell.pass', 'insert into datacell.bsktout select * 
from datacell.bsktin;');
+
+call datacell.resume();
+call datacell.dump();
+
+-- externally, activate the sensor 
 --sensor --host=localhost --port=50500 --events=100 --columns=3 --delay=1
-
--- initialize emitter
-call datacell.emitter('datacell.bsktout','localhost',50600);
-call datacell.mode('datacell.bsktout','active');
-call datacell.protocol('datacell.bsktout','udp');
-call datacell.resume('datacell.bsktout');
-
 -- externally, activate the actuator server to listen
 -- actuator 
 
--- compile the continous query
-call datacell.query('datacell.pass', 'insert into datacell.bsktout select * 
from datacell.bsktin;');
-call datacell.register('datacell.pass');
-
--- start the datacell scheduler
-call datacell.resume();
-call datacell.dump();
 
 -- wrapup
--- stop the datacell scheduler
 call datacell.postlude();
-
--- remove everything
 drop table datacell.bsktin;
 drop table datacell.bsktout;
 
diff --git a/sql/backends/monet5/datacell/Tests/scenario01.sql 
b/sql/backends/monet5/datacell/Tests/scenario01.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/datacell/Tests/scenario01.sql
@@ -0,0 +1,53 @@
+-- Scenario to exercise the datacell implementation
+-- using a single receptor and emitter
+-- The sensor data is simple passed to the actuator.
+-- this is the extended version of scenario00
+
+set optimizer='datacell_pipe';
+
+create table datacell.bsktin(
+    id integer,
+    tag timestamp,
+    payload integer
+);
+create table datacell.bsktout( like datacell.bsktin);
+
+-- initialize the baskets
+call datacell.prelude();
+call datacell.basket('datacell.bsktin');
+call datacell.basket('datacell.bsktout');
+
+-- initialize receptor
+call datacell.receptor('datacell.bsktin','localhost',50500);
+call datacell.mode('datacell.bsktin','passive');
+call datacell.protocol('datacell.bsktin','udp');
+call datacell.resume('datacell.bsktin');
+
+-- externally, activate the sensor leaving some in the basket
+--sensor --host=localhost --port=50500 --events=100 --columns=3 --delay=1
+
+-- initialize emitter
+call datacell.emitter('datacell.bsktout','localhost',50600);
+call datacell.mode('datacell.bsktout','active');
+call datacell.protocol('datacell.bsktout','udp');
+call datacell.resume('datacell.bsktout');
+
+-- externally, activate the actuator server to listen
+-- actuator 
+
+-- compile the continous query
+call datacell.query('datacell.pass', 'insert into datacell.bsktout select * 
from datacell.bsktin;');
+call datacell.register('datacell.pass');
+
+-- start the datacell scheduler
+call datacell.resume();
+call datacell.dump();
+
+-- wrapup
+-- stop the datacell scheduler
+call datacell.postlude();
+
+-- remove everything
+drop table datacell.bsktin;
+drop table datacell.bsktout;
+
diff --git a/sql/backends/monet5/datacell/Tests/scenario02.sql 
b/sql/backends/monet5/datacell/Tests/scenario02.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/datacell/Tests/scenario02.sql
@@ -0,0 +1,33 @@
+-- Scenario to exercise the datacell implementation
+-- using a single receptor and emitter
+-- Monitor the aggregation level 
+
+set optimizer='datacell_pipe';
+
+create table datacell.potin(
+    id integer,
+    tag timestamp,
+    payload integer
+);
+create table datacell.potout( tag timestamp, cnt integer);
+
+call datacell.receptor('datacell.potin','localhost',50500);
+
+call datacell.emitter('datacell.potout','localhost',50600);
+
+call datacell.query('datacell.putter', 'insert into datacell.potout select 
now(), count(*) from datacell.potin;');
+
+call datacell.resume();
+call datacell.dump();
+
+-- externally, activate the sensor 
+--sensor --host=localhost --port=50500 --events=100 --columns=3 --delay=1
+-- externally, activate the actuator server to listen
+-- actuator 
+
+
+-- wrapup
+call datacell.postlude();
+drop table datacell.potin;
+drop table datacell.potout;
+
diff --git a/sql/backends/monet5/datacell/actuator.mx 
b/sql/backends/monet5/datacell/actuator.mx
--- a/sql/backends/monet5/datacell/actuator.mx
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to