MonetDB: iot - Approve tests

2016-07-15 Thread Martin Kersten
Changeset: aafea9554ca6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aafea9554ca6
Added Files:
sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais02.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais02.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais03.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais03.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais04.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais04.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais05.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais05.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais06.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais06.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais08.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais08.stable.out
sql/backends/monet5/iot/Tests/ais/Tests/ais09.stable.err
sql/backends/monet5/iot/Tests/ais/Tests/ais09.stable.out
sql/backends/monet5/iot/Tests/receptor01.stable.err
sql/backends/monet5/iot/Tests/receptor01.stable.out
Modified Files:
sql/backends/monet5/iot/50_iot.sql
sql/backends/monet5/iot/Tests/iot06.stable.out
sql/backends/monet5/iot/Tests/iot13.sql
sql/backends/monet5/iot/petrinet.c
Branch: iot
Log Message:

Approve tests


diffs (truncated from 1072 to 300 lines):

diff --git a/sql/backends/monet5/iot/50_iot.sql 
b/sql/backends/monet5/iot/50_iot.sql
--- a/sql/backends/monet5/iot/50_iot.sql
+++ b/sql/backends/monet5/iot/50_iot.sql
@@ -74,6 +74,8 @@ create procedure iot.emitter("schema" st
 
 create procedure iot.heartbeat("schema" string, "table" string, msec integer)
external name iot.heartbeat;
+create procedure iot.heartbeat("schema" string, "table" string, msec bigint)
+   external name iot.heartbeat;
 
 -- cleaup activities 
 create procedure iot.tumble("schema" string, "table" string, elem integer)
@@ -92,7 +94,7 @@ external name iot.gettumble;
 create function iot.getwindow("schema" string, "table" string) returns integer
 external name iot.getwindow;
 
-create function iot.getheartbeat("schema" string, "table" string) returns 
integer
+create function iot.getheartbeat("schema" string, "table" string) returns 
bigint
 external name iot.getheartbeat;
 
 create function iot.baskets()
diff --git a/sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.err 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.err
@@ -0,0 +1,34 @@
+stderr of test 'ais01` in directory 'sql/backends/monet5/iot/Tests/ais` itself:
+
+
+# 22:36:54 >  
+# 22:36:54 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32280" "--set" 
"mapi_usock=/var/tmp/mtest-17740/.s.monetdb.32280" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot_Tests_ais"
+# 22:36:54 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch1/mk/iot//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 = 5
+# 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 = 32280
+# cmdline opt  mapi_usock = /var/tmp/mtest-17740/.s.monetdb.32280
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot_Tests_ais
+# cmdline opt  gdk_debug = 536870922
+
+# 22:36:55 >  
+# 22:36:55 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17740" "--port=32280"
+# 22:36:55 >  
+
+
+# 22:36:55 >  
+# 22:36:55 >  "Done."
+# 22:36:55 >  
+
diff --git a/sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.out 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.stable.out
@@ -0,0 +1,92 @@
+stdout of test 'ais01` in directory 'sql/backends/monet5/iot/Tests/ais` itself:
+
+
+# 22:36:54 >  
+# 22:36:54 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32280" "--set" 
"mapi_usock=/var/tmp/mtest-17740/.s.monetdb.32280" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/iot//Linux/var/MonetDB/mTests_sql_backends_monet5_iot_Tests_ais"
+# 22:36:54 >  
+
+# MonetDB 5 server v11.24.0
+# This is an unreleased version
+# Serving database 'mTests_sql_backends_monet5_iot_Tests_ais', using 8 threads
+# Compiled for 

MonetDB: iot - Minor fixes

2016-07-15 Thread Martin Kersten
Changeset: 61467ac73216 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=61467ac73216
Modified Files:
clients/Tests/malcheck.stable.out
sql/backends/monet5/iot/basket.c
sql/backends/monet5/iot/iot.mal
Branch: iot
Log Message:

Minor fixes


diffs (62 lines):

diff --git a/clients/Tests/malcheck.stable.out 
b/clients/Tests/malcheck.stable.out
--- a/clients/Tests/malcheck.stable.out
+++ b/clients/Tests/malcheck.stable.out
@@ -7,9 +7,8 @@ stdout of test 'malcheck` in directory '
 
 BSKTdrop: missing for MAL command drop in sql/backends/monet5/iot/basket.mal
 BSKTerror: missing for MAL command error in sql/backends/monet5/iot/iot.mal
-BSKTimportBasket: missing for MAL pattern iot.import in 
sql/backends/monet5/iot/iot.mal
+PNstop: missing for MAL pattern stop in sql/backends/monet5/iot/iot.mal
 PNstep: missing for MAL pattern step in sql/backends/monet5/iot/petrinet.mal
-PNsetCycleDelay: missing for MAL pattern period in 
sql/backends/monet5/iot/petrinet.mal
 
 # 15:16:26 >  
 # 15:16:26 >  "Done."
diff --git a/sql/backends/monet5/iot/basket.c b/sql/backends/monet5/iot/basket.c
--- a/sql/backends/monet5/iot/basket.c
+++ b/sql/backends/monet5/iot/basket.c
@@ -231,13 +231,18 @@ BSKTheartbeat(Client cntxt, MalBlkPtr mb
 {
str sch = *getArgReference_str(stk,pci,1);
str tbl = *getArgReference_str(stk,pci,2);
-   int ticks = *getArgReference_int(stk,pci,3);
+   lng ticks;
int idx;
str msg;
 
(void) cntxt;
(void) mb;
 
+   if( getArgType(mb,pci,3) == TYPE_int){
+   idx = *getArgReference_int(stk,pci,3);
+   ticks = idx;
+   } else
+   ticks = *getArgReference_lng(stk,pci,3);
if( ticks < 0)
throw(SQL,"basket.heartbeat","Positive heartbeat expected\n");
idx = BSKTlocate(sch, tbl);
@@ -255,7 +260,7 @@ BSKTheartbeat(Client cntxt, MalBlkPtr mb
 str
 BSKTgetheartbeat(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
-   int *ret = getArgReference_int(stk,pci,0);
+   lng *ret = getArgReference_lng(stk,pci,0);
str sch = *getArgReference_str(stk,pci,1);
str tbl = *getArgReference_str(stk,pci,2);
int idx;
diff --git a/sql/backends/monet5/iot/iot.mal b/sql/backends/monet5/iot/iot.mal
--- a/sql/backends/monet5/iot/iot.mal
+++ b/sql/backends/monet5/iot/iot.mal
@@ -73,7 +73,11 @@ pattern iot.heartbeat(sch:str,tbl:str,N:
 address BSKTheartbeat
 comment "Set an delay to N milliseconds";
 
-pattern iot.getheartbeat(sch:str,tbl:str):int
+pattern iot.heartbeat(sch:str,tbl:str,N:lng)
+address BSKTheartbeat
+comment "Set an delay to N milliseconds";
+
+pattern iot.getheartbeat(sch:str,tbl:str):lng
 address BSKTgetheartbeat
 comment "Get the hearbeat delay";
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: iot - Updated ais tests

2016-07-15 Thread Pedro Ferreira
Changeset: e0e57cb5831d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e0e57cb5831d
Modified Files:
clients/iotclient/requirements.txt
sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais03.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais04.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais05.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais06.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais07.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais08.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais09.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais10.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais11.sql
Branch: iot
Log Message:

Updated ais tests


diffs (truncated from 477 to 300 lines):

diff --git a/clients/iotclient/requirements.txt 
b/clients/iotclient/requirements.txt
--- a/clients/iotclient/requirements.txt
+++ b/clients/iotclient/requirements.txt
@@ -1,4 +1,4 @@
-fake-factory>=0.5.8
+fake-factory>=0.5.9
 Flask-RESTful>=0.3.5
 IPy>=0.83
 jsonschema>=2.5.1
diff --git a/sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
--- a/sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
@@ -3,12 +3,11 @@ SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
 -- Vessels positions reports table based on AIS messages types 1, 2 and 3
-CREATE STREAM TABLE vessels (implicit_timestamp timestamp, mmsi int, lat real, 
lon real, nav_status tinyint, sog real, rotais smallint);
+CREATE STREAM TABLE vessels1 (implicit_timestamp timestamp, mmsi int, lat 
real, lon real, nav_status tinyint, sog real, rotais smallint);
 
 -- Position reports are sent every 3-5 seconds so is resonable to consume the 
tuples arrived on the last 8 seconds
 -- Inserts for iot web server (providing time based flush of 8 seconds)
-INSERT INTO iot.webserverstreams
-   SELECT tabl.id, 2 , 8, 's' FROM sys.tables tabl INNER JOIN sys.schemas 
sch ON tabl.schema_id = sch.id WHERE tabl.name = 'vessels' AND sch.name = 'ais';
+INSERT INTO iot.webserverstreams SELECT tabl.id, 2 , 8, 's' FROM sys.tables 
tabl INNER JOIN sys.schemas sch ON tabl.schema_id = sch.id WHERE tabl.name = 
'vessels1' AND sch.name = 'ais';
 
 --Q1 Calculate speed of ships per hour (in knots) -- Stream only
 
@@ -18,12 +17,18 @@ CREATE PROCEDURE ais01q()
 BEGIN  
INSERT INTO ais01r
WITH data_time AS (SELECT current_timestamp AS cur_time)
-   SELECT cur_time, mmsi, sog FROM vessels CROSS JOIN data_time 
WHERE (implicit_timestamp, mmsi) IN (SELECT max(implicit_timestamp), mmsi FROM 
vessels GROUP BY mmsi);
+   SELECT cur_time, mmsi, sog FROM vessels1 CROSS JOIN data_time 
WHERE (implicit_timestamp, mmsi) IN (SELECT max(implicit_timestamp), mmsi FROM 
vessels1 GROUP BY mmsi);
 END;
 
 CALL iot.query('ais', 'ais01q');
 CALL iot.pause();
 -- We don't set the tumbling, so no tuple will be reused in the following 
window
-CALL iot.heartbeat('ais', 'vessels', 8000);
+CALL iot.heartbeat('ais', 'vessels1', 8000);
 CALL iot.resume();
 
+CALL iot.pause();
+DELETE FROM iot.webserverstreams;
+DROP PROCEDURE ais01q;
+DROP TABLE vessels1;
+DROP TABLE ais01r;
+
diff --git a/sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
--- a/sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
@@ -2,12 +2,11 @@ SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
 -- Vessels positions reports table based on AIS messages types 1, 2 and 3
-CREATE STREAM TABLE vessels (implicit_timestamp timestamp, mmsi int, lat real, 
lon real, nav_status tinyint, sog real, rotais smallint);
+CREATE STREAM TABLE vessels2 (implicit_timestamp timestamp, mmsi int, lat 
real, lon real, nav_status tinyint, sog real, rotais smallint);
 
 -- Position reports are sent every 3-5 seconds so is resonable to consume the 
tuples arrived on the last 8 seconds
 -- Inserts for iot web server (providing time based flush of 8 seconds)
-INSERT INTO iot.webserverstreams
-   SELECT tabl.id, 2 , 8, 's' FROM sys.tables tabl INNER JOIN sys.schemas 
sch ON tabl.schema_id = sch.id WHERE tabl.name = 'vessels' AND sch.name = 'ais';
+INSERT INTO iot.webserverstreams SELECT tabl.id, 2 , 8, 's' FROM sys.tables 
tabl INNER JOIN sys.schemas sch ON tabl.schema_id = sch.id WHERE tabl.name = 
'vessels2' AND sch.name = 'ais';
 
 --Q2 Number of ship per hour -- Stream only
 
@@ -16,12 +15,18 @@ CREATE TABLE ais02r (calc_time timestamp
 CREATE PROCEDURE ais02q()
 BEGIN
INSERT INTO ais02r
-   SELECT current_timestamp, count(DISTINCT mmsi) FROM vessels;
+   SELECT current_timestamp, count(DISTINCT mmsi) FROM vessels2;
 END;
 
 CALL iot.query('ais', 'ais02q');
 CALL iot.pause();
 -- We don't set the 

MonetDB: default - first resolve aggregation function before nor...

2016-07-15 Thread Niels Nes
Changeset: a2b659a3f762 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a2b659a3f762
Modified Files:
sql/server/rel_select.c
Branch: default
Log Message:

first resolve aggregation function before normal plain function.


diffs (36 lines):

diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -2599,7 +2599,7 @@ rel_unop(mvc *sql, sql_rel **rel, symbol
char *sname = qname_schema(l->data.lval);
sql_schema *s = sql->session->schema;
exp_kind iek = {type_value, card_column, FALSE};
-   sql_exp *e = rel_value_exp(sql, rel, l->next->data.sym, fs, iek);
+   sql_exp *e = NULL;
sql_subfunc *f = NULL;
sql_subtype *t = NULL;
int type = (ek.card == card_none)?F_PROC:F_FUNC;
@@ -2609,14 +2609,16 @@ rel_unop(mvc *sql, sql_rel **rel, symbol
 
if (!s)
return NULL;
-   if (!e)
-   f = find_func(sql, s, fname, 1, F_AGGR, NULL);
-   if (!e && f) { /* possibly we cannot resolve the argument as the 
function maybe an aggregate */
-   /* reset error */
-   sql->session->status = 0;
-   sql->errstr[0] = '\0';
-   return rel_aggr(sql, rel, se, fs);
+   f = find_func(sql, s, fname, 1, F_AGGR, NULL);
+   if (f) { 
+   e = rel_aggr(sql, rel, se, fs);
+   if (e)
+   return e;
}
+   /* reset error */
+   sql->session->status = 0;
+   sql->errstr[0] = '\0';
+   e = rel_value_exp(sql, rel, l->next->data.sym, fs, iek);
if (!e)
return NULL;
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: iot - Prepare AIS for testing

2016-07-15 Thread Martin Kersten
Changeset: b636256bae05 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b636256bae05
Added Files:
sql/backends/monet5/iot/Tests/ais/Tests/All
sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais03.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais04.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais05.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais06.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais07.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais08.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais09.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais10.sql
sql/backends/monet5/iot/Tests/ais/Tests/ais11.sql
Removed Files:
sql/backends/monet5/iot/Tests/ais/ais01.sql
sql/backends/monet5/iot/Tests/ais/ais02.sql
sql/backends/monet5/iot/Tests/ais/ais03.sql
sql/backends/monet5/iot/Tests/ais/ais04.sql
sql/backends/monet5/iot/Tests/ais/ais05.sql
sql/backends/monet5/iot/Tests/ais/ais06.sql
sql/backends/monet5/iot/Tests/ais/ais07.sql
sql/backends/monet5/iot/Tests/ais/ais08.sql
sql/backends/monet5/iot/Tests/ais/ais09.sql
sql/backends/monet5/iot/Tests/ais/ais10.sql
sql/backends/monet5/iot/Tests/ais/ais11.sql
Branch: iot
Log Message:

Prepare AIS for testing


diffs (112 lines):

diff --git a/sql/backends/monet5/iot/Tests/ais/Tests/All 
b/sql/backends/monet5/iot/Tests/ais/Tests/All
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/All
@@ -0,0 +1,11 @@
+ais01
+ais02
+ais03
+ais04
+ais05
+ais06
+ais07
+ais08
+ais09
+ais10
+ais11
diff --git a/sql/backends/monet5/iot/Tests/ais/ais01.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
rename from sql/backends/monet5/iot/Tests/ais/ais01.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais01.sql
diff --git a/sql/backends/monet5/iot/Tests/ais/ais02.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
rename from sql/backends/monet5/iot/Tests/ais/ais02.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais02.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais02.sql
@@ -1,4 +1,3 @@
-CREATE SCHEMA ais;
 SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
diff --git a/sql/backends/monet5/iot/Tests/ais/ais03.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais03.sql
rename from sql/backends/monet5/iot/Tests/ais/ais03.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais03.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais03.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais03.sql
@@ -1,4 +1,3 @@
-CREATE SCHEMA ais;
 SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
diff --git a/sql/backends/monet5/iot/Tests/ais/ais04.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais04.sql
rename from sql/backends/monet5/iot/Tests/ais/ais04.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais04.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais04.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais04.sql
@@ -1,4 +1,3 @@
-CREATE SCHEMA ais;
 SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
diff --git a/sql/backends/monet5/iot/Tests/ais/ais05.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais05.sql
rename from sql/backends/monet5/iot/Tests/ais/ais05.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais05.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais05.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais05.sql
@@ -1,4 +1,3 @@
-CREATE SCHEMA ais;
 SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
diff --git a/sql/backends/monet5/iot/Tests/ais/ais06.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais06.sql
rename from sql/backends/monet5/iot/Tests/ais/ais06.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais06.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais06.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais06.sql
@@ -1,4 +1,3 @@
-CREATE SCHEMA ais;
 SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
diff --git a/sql/backends/monet5/iot/Tests/ais/ais07.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais07.sql
rename from sql/backends/monet5/iot/Tests/ais/ais07.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais07.sql
diff --git a/sql/backends/monet5/iot/Tests/ais/ais08.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais08.sql
rename from sql/backends/monet5/iot/Tests/ais/ais08.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais08.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais08.sql
+++ b/sql/backends/monet5/iot/Tests/ais/Tests/ais08.sql
@@ -1,4 +1,3 @@
-CREATE SCHEMA ais;
 SET SCHEMA ais;
 SET optimizer = 'iot_pipe';
 
diff --git a/sql/backends/monet5/iot/Tests/ais/ais09.sql 
b/sql/backends/monet5/iot/Tests/ais/Tests/ais09.sql
rename from sql/backends/monet5/iot/Tests/ais/ais09.sql
rename to sql/backends/monet5/iot/Tests/ais/Tests/ais09.sql
--- a/sql/backends/monet5/iot/Tests/ais/ais09.sql
+++ 

MonetDB: iot - Dealing with heartbeat

2016-07-15 Thread Martin Kersten
Changeset: 47a483ec0635 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=47a483ec0635
Modified Files:
sql/backends/monet5/iot/50_iot.sql
sql/backends/monet5/iot/Tests/iot02.sql
sql/backends/monet5/iot/Tests/iot03.sql
sql/backends/monet5/iot/Tests/iot04.sql
sql/backends/monet5/iot/Tests/iot04.stable.out
sql/backends/monet5/iot/Tests/iot10.sql
sql/backends/monet5/iot/Tests/iot12.sql
sql/backends/monet5/iot/Tests/iot12.stable.out
sql/backends/monet5/iot/Tests/iot13.sql
sql/backends/monet5/iot/Tests/iot14.sql
sql/backends/monet5/iot/Tests/iot16.sql
sql/backends/monet5/iot/Tests/logger.sql
sql/backends/monet5/iot/iot.c
sql/backends/monet5/iot/iot.h
sql/backends/monet5/iot/iot.mal
sql/backends/monet5/iot/petrinet.c
sql/backends/monet5/iot/petrinet.h
sql/backends/monet5/iot/petrinet.mal
Branch: iot
Log Message:

Dealing with heartbeat


diffs (truncated from 792 to 300 lines):

diff --git a/sql/backends/monet5/iot/50_iot.sql 
b/sql/backends/monet5/iot/50_iot.sql
--- a/sql/backends/monet5/iot/50_iot.sql
+++ b/sql/backends/monet5/iot/50_iot.sql
@@ -18,9 +18,15 @@
 create schema iot;
 
 -- register and start a continuous query
+create procedure iot.query(qry string, maxcalls integer)
+   external name iot.query;
+
 create procedure iot.query(qry string)
external name iot.query;
 
+create procedure iot.query("schema" string, name string, maxcalls integer)
+   external name iot.query;
+
 create procedure iot.query("schema" string, name string)
external name iot.query;
 
@@ -48,10 +54,6 @@ create procedure iot.deregister("schema"
 create procedure iot.deregister()
external name iot.deregister;
 
--- resume with limited the number of scheduler loops before next pause
-create procedure iot.cycles(n integer)
-   external name iot.cycles;
-
 -- set the scheduler periodic delay
 create procedure iot.period(n integer)
external name iot.period;
diff --git a/sql/backends/monet5/iot/Tests/iot02.sql 
b/sql/backends/monet5/iot/Tests/iot02.sql
--- a/sql/backends/monet5/iot/Tests/iot02.sql
+++ b/sql/backends/monet5/iot/Tests/iot02.sql
@@ -23,8 +23,8 @@ insert into stmp2 values('2005-09-23 12:
 
 call iot.resume('iot','cq02');
 
--- wait for 1 cycle in the scheduler
-call iot.wait(5);
+-- wait for 5 seconds for handler
+call iot.wait(5000);
 
 select 'RESULT';
 select * from stmp2;
diff --git a/sql/backends/monet5/iot/Tests/iot03.sql 
b/sql/backends/monet5/iot/Tests/iot03.sql
--- a/sql/backends/monet5/iot/Tests/iot03.sql
+++ b/sql/backends/monet5/iot/Tests/iot03.sql
@@ -20,7 +20,8 @@ insert into stmp3 values('2005-09-23 12:
 insert into stmp3 values('2005-09-23 12:34:28.000',1,15.0);
 
 call iot.resume('iot','cq03');
-call iot.wait(4);
+-- wait a few seconds
+call iot.wait(5000);
 
 select * from stmp3;
 select * from result3;
diff --git a/sql/backends/monet5/iot/Tests/iot04.sql 
b/sql/backends/monet5/iot/Tests/iot04.sql
--- a/sql/backends/monet5/iot/Tests/iot04.sql
+++ b/sql/backends/monet5/iot/Tests/iot04.sql
@@ -10,7 +10,7 @@ begin
insert into result select min(t), count(*), avg(val) from stmp;
 end;
 
-call iot.query('iot','cq00');
+call iot.query('iot','cq00',1);
 --call iot.query('insert into iot.result select min(t), count(*), avg(val) 
from iot.stmp;');
 
 --select * from  iot.baskets();
@@ -25,16 +25,15 @@ insert into stmp values('2005-09-23 12:3
 select * from stmp;
 
 -- let the cq run only wanse
-call iot.cycles('iot','cq00',1);
 call iot.resume();
--- wait for 1 cycle in the scheduler
-call iot.wait(10);
+-- wait a few seconds
+call iot.wait(5000);
 
 select 'RESULT';
 select * from result;
 
 --select * from  iot.baskets();
-select * from  iot.queries();
+--select * from  iot.queries();
 select * from iot.errors();
 call iot.stop();
 drop procedure cq00;
diff --git a/sql/backends/monet5/iot/Tests/iot04.stable.out 
b/sql/backends/monet5/iot/Tests/iot04.stable.out
--- a/sql/backends/monet5/iot/Tests/iot04.stable.out
+++ b/sql/backends/monet5/iot/Tests/iot04.stable.out
@@ -53,11 +53,6 @@ Ready.
 % timestamp,   int,decimal # type
 % 26,  1,  10 # length
 [ 2005-09-23 12:34:26.736000,  1,  12.34   ]
-#select * from  iot.queries();
-% .,   .,  .,  .,  .,  .,  .,  . # table_name
-% schema,  function,   status, lastrun,cycles, events, time,   
error # name
-% clob,clob,   clob,   timestamp,  int,int,bigint, clob # 
type
-% 0,   0,  0,  26, 1,  1,  1,  0 # length
 #select * from iot.errors();
 % .,   . # table_name
 % table,   error # name
diff --git a/sql/backends/monet5/iot/Tests/iot10.sql 
b/sql/backends/monet5/iot/Tests/iot10.sql
--- a/sql/backends/monet5/iot/Tests/iot10.sql
+++ b/sql/backends/monet5/iot/Tests/iot10.sql
@@ -28,7 +28,8 @@ call iot.query('iot','collector');
 --select * from iot.queries();
 
 call 

MonetDB: HTM - Merge with 2PC

2016-07-15 Thread Panagiotis Koutsourakis
Changeset: d9ca9b480e6a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d9ca9b480e6a
Added Files:
ChangeLog-Archive
ChangeLog.Jun2016
gdk/gdk_interprocess.c
gdk/gdk_interprocess.h
java/tests/Test_PSgetObject.java
sql/backends/monet5/Tests/pyapi31.sql
sql/backends/monet5/UDF/cudf/80_udf.mal
sql/backends/monet5/UDF/cudf/80_udf.sql
sql/backends/monet5/UDF/cudf/80_udf_hge.mal
sql/backends/monet5/UDF/cudf/80_udf_hge.sql
sql/backends/monet5/UDF/cudf/Makefile.ag
sql/backends/monet5/UDF/cudf/README
sql/backends/monet5/UDF/cudf/Tests/All
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out
sql/backends/monet5/UDF/cudf/udf.c
sql/backends/monet5/UDF/cudf/udf.h
sql/backends/monet5/UDF/cudf/udf.mal
sql/backends/monet5/UDF/cudf/udf_hge.mal
sql/backends/monet5/UDF/cudf/udf_impl.h
sql/backends/monet5/UDF/pyapi/50_pyapi.mal
sql/backends/monet5/UDF/pyapi/Makefile.ag
sql/backends/monet5/UDF/pyapi/Tests/All
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC

sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.stable.err

sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out
sql/backends/monet5/UDF/pyapi/connection.c
sql/backends/monet5/UDF/pyapi/connection.h
sql/backends/monet5/UDF/pyapi/formatinput.c
sql/backends/monet5/UDF/pyapi/formatinput.h
sql/backends/monet5/UDF/pyapi/pyapi.c
sql/backends/monet5/UDF/pyapi/pyapi.h
sql/backends/monet5/UDF/pyapi/pyapi.mal
sql/backends/monet5/UDF/pyapi/pyapi_locatepython.bat
sql/backends/monet5/UDF/pyapi/pytypes.c
sql/backends/monet5/UDF/pyapi/pytypes.h
sql/backends/monet5/UDF/pyapi/type_conversion.c
sql/backends/monet5/UDF/pyapi/type_conversion.h
sql/backends/monet5/UDF/pyapi/unicode.c
sql/backends/monet5/UDF/pyapi/unicode.h
sql/backends/monet5/UDF/pyapi/unspecified_evil.h
sql/jdbc/tests/Tests/Test_PSgetObject.SQL.bat
sql/jdbc/tests/Tests/Test_PSgetObject.SQL.sh
sql/jdbc/tests/Tests/Test_PSgetObject.stable.err
sql/jdbc/tests/Tests/Test_PSgetObject.stable.out
sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.sql

sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.stable.err

sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.stable.out
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.sql
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.stable.err
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.stable.out
sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.sql

sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.err

sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.out
sql/test/bugs/Tests/select_select_bug.sql
sql/test/bugs/Tests/select_select_bug.stable.err

MonetDB: 2PC - Merge with default

2016-07-15 Thread Panagiotis Koutsourakis
Changeset: 5c6c43b3f7b1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5c6c43b3f7b1
Added Files:
ChangeLog-Archive
ChangeLog.Jun2016
gdk/gdk_interprocess.c
gdk/gdk_interprocess.h
java/tests/Test_PSgetObject.java
sql/backends/monet5/Tests/pyapi31.sql
sql/backends/monet5/UDF/cudf/80_udf.mal
sql/backends/monet5/UDF/cudf/80_udf.sql
sql/backends/monet5/UDF/cudf/80_udf_hge.mal
sql/backends/monet5/UDF/cudf/80_udf_hge.sql
sql/backends/monet5/UDF/cudf/Makefile.ag
sql/backends/monet5/UDF/cudf/README
sql/backends/monet5/UDF/cudf/Tests/All
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-fuse.stable.out
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.sql
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.err
sql/backends/monet5/UDF/cudf/Tests/udf-reverse.stable.out
sql/backends/monet5/UDF/cudf/udf.c
sql/backends/monet5/UDF/cudf/udf.h
sql/backends/monet5/UDF/cudf/udf.mal
sql/backends/monet5/UDF/cudf/udf_hge.mal
sql/backends/monet5/UDF/cudf/udf_impl.h
sql/backends/monet5/UDF/pyapi/50_pyapi.mal
sql/backends/monet5/UDF/pyapi/Makefile.ag
sql/backends/monet5/UDF/pyapi/Tests/All
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_boolean.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.malC

sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.stable.err

sql/backends/monet5/UDF/pyapi/Tests/pyapi_numpy_numeric_nested.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_pandas.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_boolean.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_huge.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_numeric.stable.out
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.malC
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.err
sql/backends/monet5/UDF/pyapi/Tests/pyapi_types_string.stable.out
sql/backends/monet5/UDF/pyapi/connection.c
sql/backends/monet5/UDF/pyapi/connection.h
sql/backends/monet5/UDF/pyapi/formatinput.c
sql/backends/monet5/UDF/pyapi/formatinput.h
sql/backends/monet5/UDF/pyapi/pyapi.c
sql/backends/monet5/UDF/pyapi/pyapi.h
sql/backends/monet5/UDF/pyapi/pyapi.mal
sql/backends/monet5/UDF/pyapi/pyapi_locatepython.bat
sql/backends/monet5/UDF/pyapi/pytypes.c
sql/backends/monet5/UDF/pyapi/pytypes.h
sql/backends/monet5/UDF/pyapi/type_conversion.c
sql/backends/monet5/UDF/pyapi/type_conversion.h
sql/backends/monet5/UDF/pyapi/unicode.c
sql/backends/monet5/UDF/pyapi/unicode.h
sql/backends/monet5/UDF/pyapi/unspecified_evil.h
sql/jdbc/tests/Tests/Test_PSgetObject.SQL.bat
sql/jdbc/tests/Tests/Test_PSgetObject.SQL.sh
sql/jdbc/tests/Tests/Test_PSgetObject.stable.err
sql/jdbc/tests/Tests/Test_PSgetObject.stable.out
sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.sql

sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.stable.err

sql/test/BugTracker-2016/Tests/analyze-quotes-incorrectly.Bug-4021.stable.out
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.sql
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.stable.err
sql/test/BugTracker-2016/Tests/boolean-evaluation.Bug-4025.stable.out
sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.sql

sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.err

sql/test/BugTracker-2016/Tests/nested-mal-with-multiplex.Bug-4035.stable.out
sql/test/bugs/Tests/select_select_bug.sql
sql/test/bugs/Tests/select_select_bug.stable.err

MonetDB: sfcgal - Revert previous commit it was a mistake.

2016-07-15 Thread Romulo Goncalves
Changeset: f8611029f7a0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8611029f7a0
Modified Files:
geom/sql/40_geom.sql
Branch: sfcgal
Log Message:

Revert previous commit it was a mistake.


diffs (12 lines):

diff --git a/geom/sql/40_geom.sql b/geom/sql/40_geom.sql
--- a/geom/sql/40_geom.sql
+++ b/geom/sql/40_geom.sql
@@ -4362,7 +4362,7 @@ CREATE FUNCTION ST_Length2D(geom Geometr
 --CREATE FUNCTION ST_Buffer(geog Geography, radius double) RETURNS Geometry 
EXTERNAL NAME geom."Buffer";
 --CREATE FUNCTION ST_BuildArea RETURNS EXTERNAL NAME
 --collect is the same to union. POstGIS just has a more efficient 
implementation for it compared to union
-CREATE FUNCTION ST_Collect(geom1 Geometry) RETURNS Geometry EXTERNAL NAME 
geom."Collect";
+CREATE FUNCTION ST_Collect(geom1 Geometry, geom2 Geometry) RETURNS Geometry 
EXTERNAL NAME geom."Collect";
 CREATE AGGREGATE ST_Collect(geom Geometry) RETURNS Geometry external name 
geom."Collect";
 --CREATE FUNCTION ST_ConcaveHull RETURNS EXTERNAL NAME
 CREATE FUNCTION ST_DelaunayTriangles(geom Geometry, tolerance double, flags 
integer) RETURNS Geometry EXTERNAL NAME geom."DelaunayTriangles";
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: sfcgal - Get back the old function signature

2016-07-15 Thread Romulo Goncalves
Changeset: ee7e3c626bc0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ee7e3c626bc0
Modified Files:
geom/sql/40_geom.sql
Branch: sfcgal
Log Message:

Get back the old function signature


diffs (12 lines):

diff --git a/geom/sql/40_geom.sql b/geom/sql/40_geom.sql
--- a/geom/sql/40_geom.sql
+++ b/geom/sql/40_geom.sql
@@ -4362,7 +4362,7 @@ CREATE FUNCTION ST_Length2D(geom Geometr
 --CREATE FUNCTION ST_Buffer(geog Geography, radius double) RETURNS Geometry 
EXTERNAL NAME geom."Buffer";
 --CREATE FUNCTION ST_BuildArea RETURNS EXTERNAL NAME
 --collect is the same to union. POstGIS just has a more efficient 
implementation for it compared to union
-CREATE FUNCTION ST_Collect(geom1 Geometry, geom2 Geometry) RETURNS Geometry 
EXTERNAL NAME geom."Collect";
+CREATE FUNCTION ST_Collect(geom1 Geometry) RETURNS Geometry EXTERNAL NAME 
geom."Collect";
 CREATE AGGREGATE ST_Collect(geom Geometry) RETURNS Geometry external name 
geom."Collect";
 --CREATE FUNCTION ST_ConcaveHull RETURNS EXTERNAL NAME
 CREATE FUNCTION ST_DelaunayTriangles(geom Geometry, tolerance double, flags 
integer) RETURNS Geometry EXTERNAL NAME geom."DelaunayTriangles";
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Fix memory leak.

2016-07-15 Thread Mark Raasveldt
Changeset: 7faba9ad4552 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7faba9ad4552
Modified Files:
sql/backends/monet5/UDF/pyapi/pyapi.c
Branch: default
Log Message:

Fix memory leak.


diffs (21 lines):

diff --git a/sql/backends/monet5/UDF/pyapi/pyapi.c 
b/sql/backends/monet5/UDF/pyapi/pyapi.c
--- a/sql/backends/monet5/UDF/pyapi/pyapi.c
+++ b/sql/backends/monet5/UDF/pyapi/pyapi.c
@@ -1512,6 +1512,8 @@ wrapup:
 GDKreleasemmap(mmap_ptrs[i], mmap_sizes[i], mmap_id + i, );
 }
 }
+if (mmap_ptrs) GDKfree(mmap_ptrs);
+if (mmap_sizes) GDKfree(mmap_sizes);
 if (query_sem > 0) {
 GDKreleasesem(query_sem, );
 }
@@ -1553,7 +1555,7 @@ wrapup:
 GDKfree(pyreturn_values);
 GDKfree(pyinput_values);
 for (i = 0; i < pci->argc; i++)
-if (args[i] != NULL)
+if (args[i])
 GDKfree(args[i]);
 GDKfree(args);
 GDKfree(pycall);
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: mosaic - Compilation issues

2016-07-15 Thread Martin Kersten
Changeset: b3a674b93696 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b3a674b93696
Modified Files:
monetdb5/modules/mosaic/mosaic_frame.c
monetdb5/modules/mosaic/mosaic_prefix.c
Branch: mosaic
Log Message:

Compilation issues


diffs (42 lines):

diff --git a/monetdb5/modules/mosaic/mosaic_frame.c 
b/monetdb5/modules/mosaic/mosaic_frame.c
--- a/monetdb5/modules/mosaic/mosaic_frame.c
+++ b/monetdb5/modules/mosaic/mosaic_frame.c
@@ -194,7 +194,7 @@ MOSskip_frame(Client cntxt, MOStask task
cnt[j]++;\
}\
for(i=0; i< (BUN) hdr->framesize; i++)\
-   for(j=i+1; j< hdr->framesize; j++)\
+   for(j=(int)(i+1); j< hdr->framesize; j++)\
if(task->hdr->frame.val##TPE[i] 
>task->hdr->frame.val##TPE[j]){\
v= task->hdr->frame.val##TPE[i];\
task->hdr->frame.val##TPE[i] = 
task->hdr->frame.val##TPE[j];\
@@ -255,7 +255,7 @@ MOScreateframeDictionary(Client cntxt, M
//assert(hdr->framesize);
// sort it
for(i=0; i< (BUN) hdr->framesize; i++)
-   for(j= (BUN)(i+1); j< hdr->framesize; j++)
+   for(j= (int)(i+1); j< hdr->framesize; j++)
if(task->hdr->frame.valint[i] 
>task->hdr->frame.valint[j]){
int v= 
task->hdr->frame.valint[i];
task->hdr->frame.valint[i] = 
task->hdr->frame.valint[j];
diff --git a/monetdb5/modules/mosaic/mosaic_prefix.c 
b/monetdb5/modules/mosaic/mosaic_prefix.c
--- a/monetdb5/modules/mosaic/mosaic_prefix.c
+++ b/monetdb5/modules/mosaic/mosaic_prefix.c
@@ -929,7 +929,7 @@ MOSprojection_prefix(Client cntxt,  MOSt
int residu;\
TPE value;\
m = ~mask;\
-   residu = val & m;\
+   residu = (int)(val & m);\
val = val & mask;\
base = (BitVector) dst;\
w = (TPE*) task->src;\
@@ -972,7 +972,7 @@ MOSsubjoin_prefix(Client cntxt,  MOStask
int residu;
lng value;
m = ~mask;
-   residu = val & m;
+   residu = (int)(val & m);
val = val & mask;
base = (BitVector) dst;
w = (lng*) task->src;
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list