Changeset: 259d877651c7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=259d877651c7
Added Files:
        sql/backends/monet5/iot/Tests/iot11.sql
Modified Files:
        monetdb5/mal/Tests/tst031.malC
        sql/backends/monet5/iot/Tests/All
        sql/backends/monet5/iot/Tests/iot14.sql
Branch: iot
Log Message:

Add a new test


diffs (96 lines):

diff --git a/monetdb5/mal/Tests/tst031.malC b/monetdb5/mal/Tests/tst031.malC
--- a/monetdb5/mal/Tests/tst031.malC
+++ b/monetdb5/mal/Tests/tst031.malC
@@ -4,11 +4,6 @@ bat.append(b,0);
 bat.append(b,1);
 bat.append(b,2);
 io.print(b);
-#k:= 1@0;
-#bat.replace(b,k,3);
-#io.print(b);
-#bat.delete(b,2@0);
-#io.print(b);
 
 # The oid cases, they should start as a vid column, both replace and delete 
work
 io.print("oid as a vid column");
@@ -23,19 +18,6 @@ io.print(c);
 bat.delete(c,2@0);
 io.print(c);
 
-# The oid cases using nils should fail on replace /delete
-io.print("appending nil's in a oid column");
-d:= bat.new(:int);
-bat.append(d,0);
-bat.append(d,1);
-bat.append(d,2);
-io.print(d);
-k:= 1@0;
-bat.replace(d,k,3);
-io.print(d);
-bat.delete(d,2@0);
-io.print(d);
-
 # can we handle a vid column starting differently
 io.print("double oid as a vid column starting at 3,5");
 e:= bat.new(:oid);
diff --git a/sql/backends/monet5/iot/Tests/All 
b/sql/backends/monet5/iot/Tests/All
--- a/sql/backends/monet5/iot/Tests/All
+++ b/sql/backends/monet5/iot/Tests/All
@@ -10,6 +10,7 @@ iot03
 iot04
 iot06
 iot10
+iot11
 iot12
 iot13
 iot14
diff --git a/sql/backends/monet5/iot/Tests/iot11.sql 
b/sql/backends/monet5/iot/Tests/iot11.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/iot/Tests/iot11.sql
@@ -0,0 +1,23 @@
+-- check proper deletion from a stream table
+set schema iot;
+set optimizer='iot_pipe';
+
+create stream table sdel11 (t timestamp, sensor integer, val decimal(8,2)) ;
+
+insert into sdel11 values('2005-09-23 12:34:26.736',1,12.31);
+insert into sdel11 values('2005-09-23 12:34:26.736',2,12.32);
+insert into sdel11 values('2005-09-23 12:34:26.736',3,12.33);
+insert into sdel11 values('2005-09-23 12:34:26.736',4,12.34);
+insert into sdel11 values('2005-09-23 12:34:26.736',2,12.35);
+
+-- don't remove tuples automatically
+call iot.keep('iot','sdel11');
+
+explain select * from sdel11;
+explain delete from sdel11 where sensor = 2;
+
+select * from sdel11;
+delete from sdel11 where sensor = 2;
+select * from sdel11;
+
+drop table sdel11;
diff --git a/sql/backends/monet5/iot/Tests/iot14.sql 
b/sql/backends/monet5/iot/Tests/iot14.sql
--- a/sql/backends/monet5/iot/Tests/iot14.sql
+++ b/sql/backends/monet5/iot/Tests/iot14.sql
@@ -4,18 +4,6 @@ set optimizer='iot_pipe';
 
 create stream table sdel (t timestamp, sensor integer, val decimal(8,2)) ;
 
-insert into sdel values('2005-09-23 12:34:26.736',1,12.34);
-insert into sdel values('2005-09-23 12:34:26.736',2,12.34);
-insert into sdel values('2005-09-23 12:34:26.736',3,12.34);
-insert into sdel values('2005-09-23 12:34:26.736',4,12.34);
-select * from sdel;
-
-delete from sdel where sensor = 2;
-select * from sdel;
-
--- don't remove tuples automatically
-call iot.tumble('iot','sdel',0);
-
 create procedure sdel00()
 begin
        delete from sdel where sensor = 3;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to