Changeset: b29c9d42646c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b29c9d42646c Added Files: sql/backends/monet5/iot/Tests/bug06.sql Branch: iot Log Message:
Added bug test for tuple windows correctness diffs (26 lines): diff --git a/sql/backends/monet5/iot/Tests/bug06.sql b/sql/backends/monet5/iot/Tests/bug06.sql new file mode 100644 --- /dev/null +++ b/sql/backends/monet5/iot/Tests/bug06.sql @@ -0,0 +1,21 @@ +CREATE SCHEMA iot; +SET SCHEMA iot; +SET OPTIMIZER = 'iot_pipe'; + +CREATE STREAM TABLE temperature (t TIMESTAMP, sensor INT, val DECIMAL); +CALL window('iot', 'temperature', 3); +CREATE TABLE results (minimum TIMESTAMP, tuples INT, average DECIMAL); + +CREATE PROCEDURE testing() +BEGIN + INSERT INTO results SELECT MIN(t), COUNT(*), AVG(val) FROM temperature; +END; + +CALL query('iot', 'testing'); + +INSERT INTO temperature VALUES (now(), 1, 1), (now(), 2, 2), (now(), 3, 3), (now(), 4, 4); + +SELECT * FROM results; /* should have only 1 row, where "tuples" column value is 3 */ + +CALL getwindow('iot','temperature'); /* should not hang! */ + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list