Changeset: 98220958d47c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=98220958d47c
Added Files:
        sql/test/sciql2sql/Tests/create_step_flt_array.sql
        sql/test/sciql2sql/Tests/update_fixed_array.sql
        sql/test/sciql2sql/Tests/update_unbound_array.sql
Removed Files:
        sql/test/sciql2sql/Tests/create_step_float_array.sql
        sql/test/sciql2sql/Tests/update_fixed_arrays.sql
Modified Files:
        sql/test/sciql2sql/Tests/All
Branch: SciQL-2
Log Message:

Added the update over unbounded array


diffs (82 lines):

diff --git a/sql/test/sciql2sql/Tests/All b/sql/test/sciql2sql/Tests/All
--- a/sql/test/sciql2sql/Tests/All
+++ b/sql/test/sciql2sql/Tests/All
@@ -8,6 +8,7 @@ create_unbound_step_array.sql
 
 # update non-dimensional attributes
 update_fixed_array
+update_unbound_array
 # update dimensional attributes
 
 # selections with target is relation
diff --git a/sql/test/sciql2sql/Tests/create_step_float_array.sql 
b/sql/test/sciql2sql/Tests/create_step_flt_array.sql
rename from sql/test/sciql2sql/Tests/create_step_float_array.sql
rename to sql/test/sciql2sql/Tests/create_step_flt_array.sql
diff --git a/sql/test/sciql2sql/Tests/update_fixed_arrays.sql 
b/sql/test/sciql2sql/Tests/update_fixed_array.sql
rename from sql/test/sciql2sql/Tests/update_fixed_arrays.sql
rename to sql/test/sciql2sql/Tests/update_fixed_array.sql
diff --git a/sql/test/sciql2sql/Tests/update_unbound_array.sql 
b/sql/test/sciql2sql/Tests/update_unbound_array.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/sciql2sql/Tests/update_unbound_array.sql
@@ -0,0 +1,60 @@
+-- unbounded arrays get their implicit temporary dimension using updates
+CREATE ARRAY array1Dunbound(x INTEGER DIMENSION, v INTEGER DEFAULT 1);
+INSERT INTO array1Dunbound VALUES (0,0),(3,3);
+SELECT * FROM array1Dunbound;
+DROP ARRAY array1Dunbound;
+
+-- relational equivalent, fill it to generate the complete picture
+CREATE TABLE array1Dunbound(x INTEGER, v INTEGER DEFAULT 1);
+INSERT INTO array1Dunbound VALUES (0,0),(3,3);
+-- implicitly added, fill it
+INSERT INTO array1Dunbound VALUES (1,1),(2,1);
+SELECT * FROM array1Dunbound ORDER BY x;
+DROP ARRAY array1Dunbound;
+
+-- update over existing cell is identical to fixed-array
+CREATE ARRAY array1Dunbound(x INTEGER DIMENSION, v INTEGER DEFAULT 1);
+INSERT INTO array1Dunbound VALUES (0,0),(3,3);
+SELECT * FROM array1Dunbound;
+INSERT INTO array1Dunbound VALUES (0,1);
+SELECT * FROM array1Dunbound;
+-- update over non-initialized cell
+INSERT INTO array1Dunbound VALUES (1,7);
+SELECT * FROM array1Dunbound;
+DROP ARRAY array1Dunbound;
+
+-- relational equivalent, fill it to generate the complete picture
+CREATE TABLE array1Dunbound(x INTEGER, v INTEGER DEFAULT 1);
+INSERT INTO array1Dunbound VALUES (0,0),(3,3);
+-- implicitly added, fill it
+INSERT INTO array1Dunbound VALUES (1,1),(2,1);
+SELECT * FROM array1Dunbound ORDER BY x;
+-- remainings turned into an update
+DELETE FROM array1Dunbound WHERE x = 0;
+INSERT INTO array1Dunbound VALUES (0,1);
+SELECT * FROM array1Dunbound ORDER BY x;
+-- update over non-initialized cell
+DELETE FROM array1Dunbound WHERE x = 1;
+INSERT INTO array1Dunbound VALUES (1,7);
+SELECT * FROM array1Dunbound ORDER BY x;
+DROP ARRAY array1Dunbound;
+
+
+-- update queries
+CREATE ARRAY array1Dunbound(x INTEGER DIMENSION, v INTEGER DEFAULT 1);
+INSERT INTO array1Dunbound VALUES (0,0),(3,3);
+UPDATE array1Dunbound SET v = NULL;
+SELECT * FROM array1Dunbound;
+DROP ARRAY array1Dunbound;
+
+-- relational equivalent, fill it to generate the complete picture
+CREATE TABLE array1Dunbound(x INTEGER, v INTEGER DEFAULT 1);
+INSERT INTO array1Dunbound VALUES (0,0),(3,3);
+-- implicitly added, fill it
+INSERT INTO array1Dunbound VALUES (1,1),(2,1);
+UPDATE array1Dunbound SET v = NULL;
+SELECT * FROM array1Dunbound ORDER BY x;
+DROP TABLE array1Dunbound;
+
+-- semantic errors preferrably catched
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to