Changeset: d596b1d6f3a9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d596b1d6f3a9
Modified Files:
sql/test/rel-optimizers/Tests/local-replica.test
sql/test/rel-optimizers/Tests/replicas-base.test
sql/test/rel-optimizers/Tests/replicas-join-plan.test
Branch: Dec2023
Log Message:
Modify test slightly to get same output with NOWAL.
With NOWAL the data is written sooner to the base table, and GDK then
noticed the uniqueness of some of the columns which triggers a different
annotation in the plan. We now work around the GDK smarts.
diffs (178 lines):
diff --git a/sql/test/rel-optimizers/Tests/local-replica.test
b/sql/test/rel-optimizers/Tests/local-replica.test
--- a/sql/test/rel-optimizers/Tests/local-replica.test
+++ b/sql/test/rel-optimizers/Tests/local-replica.test
@@ -1,4 +1,3 @@
-
statement ok
create replica table foo_rpl_loc (n int, m text)
@@ -23,7 +22,7 @@ plan select * from foo_rpl_loc, bar_rpl_
----
project (
| crossproduct (
-| | table("sys"."foo_local") [ "foo_local"."n" UNIQUE as "foo_rpl_loc"."n",
"foo_local"."m" as "foo_rpl_loc"."m", "foo_local"."%TID%" NOT NULL UNIQUE as
"foo_rpl_loc"."%TID%" ],
+| | table("sys"."foo_local") [ "foo_local"."n" as "foo_rpl_loc"."n",
"foo_local"."m" as "foo_rpl_loc"."m", "foo_local"."%TID%" NOT NULL UNIQUE as
"foo_rpl_loc"."%TID%" ],
| | table("sys"."bar_local") [ "bar_local"."n" as "bar_rpl_loc"."n",
"bar_local"."m" as "bar_rpl_loc"."m", "bar_local"."%TID%" NOT NULL UNIQUE as
"bar_rpl_loc"."%TID%" ]
| ) [ ]
) [ "foo_rpl_loc"."n", "foo_rpl_loc"."m", "bar_rpl_loc"."n", "bar_rpl_loc"."m"
]
@@ -32,6 +31,22 @@ query ITIT rowsort
select * from foo_rpl_loc, bar_rpl_loc
----
1
+again
+10
+alice
+1
+again
+20
+bob
+1
+again
+20
+mary
+1
+again
+30
+tom
+1
hello
10
alice
@@ -41,6 +56,10 @@ 20
bob
1
hello
+20
+mary
+1
+hello
30
tom
2
@@ -53,6 +72,10 @@ 20
bob
2
world
+20
+mary
+2
+world
30
tom
3
@@ -65,6 +88,10 @@ 20
bob
3
!!
+20
+mary
+3
+!!
30
tom
@@ -73,7 +100,7 @@ plan select * from foo_rpl_loc, buz_rmt
----
project (
| crossproduct (
-| | table("sys"."foo_local") [ "foo_local"."n" UNIQUE as "foo_rpl_loc"."n",
"foo_local"."m" as "foo_rpl_loc"."m", "foo_local"."%TID%" NOT NULL UNIQUE as
"foo_rpl_loc"."%TID%" ],
+| | table("sys"."foo_local") [ "foo_local"."n" as "foo_rpl_loc"."n",
"foo_local"."m" as "foo_rpl_loc"."m", "foo_local"."%TID%" NOT NULL UNIQUE as
"foo_rpl_loc"."%TID%" ],
| | table (
| | | REMOTE("sys"."buz_rmt") [ "buz_rmt"."l" ] REMOTE
mapi:monetdb://localhost:50002/node2
| | ) [ "buz_rmt"."l" ]
diff --git a/sql/test/rel-optimizers/Tests/replicas-base.test
b/sql/test/rel-optimizers/Tests/replicas-base.test
--- a/sql/test/rel-optimizers/Tests/replicas-base.test
+++ b/sql/test/rel-optimizers/Tests/replicas-base.test
@@ -2,7 +2,7 @@ statement ok
create table foo_local (n int, m text)
statement ok
-insert into foo_local values (1, 'hello'), (2, 'world'), (3, '!!')
+insert into foo_local values (1, 'hello'), (2, 'world'), (3, '!!'), (1,
'again')
statement ok
create remote table foo_r2 (n int, m text) on
'mapi:monetdb://localhost:50002/node2'
@@ -15,7 +15,7 @@ statement ok
create table bar_local (n int, m text)
statement ok
-insert into bar_local values (10, 'alice'), (20, 'bob'), (30, 'tom')
+insert into bar_local values (10, 'alice'), (20, 'bob'), (30, 'tom'), (20,
'mary')
statement ok
create remote table bar_r2 (n int, m text) on
'mapi:monetdb://localhost:50002/node2'
diff --git a/sql/test/rel-optimizers/Tests/replicas-join-plan.test
b/sql/test/rel-optimizers/Tests/replicas-join-plan.test
--- a/sql/test/rel-optimizers/Tests/replicas-join-plan.test
+++ b/sql/test/rel-optimizers/Tests/replicas-join-plan.test
@@ -34,7 +34,7 @@ plan select * from foo_rpl, bar_rpl
----
project (
| crossproduct (
-| | table("sys"."foo_local") [ "foo_local"."n" UNIQUE as "foo_rpl"."n",
"foo_local"."m" as "foo_rpl"."m", "foo_local"."%TID%" NOT NULL UNIQUE as
"foo_rpl"."%TID%" ],
+| | table("sys"."foo_local") [ "foo_local"."n" as "foo_rpl"."n",
"foo_local"."m" as "foo_rpl"."m", "foo_local"."%TID%" NOT NULL UNIQUE as
"foo_rpl"."%TID%" ],
| | table("sys"."bar_local") [ "bar_local"."n" as "bar_rpl"."n",
"bar_local"."m" as "bar_rpl"."m", "bar_local"."%TID%" NOT NULL UNIQUE as
"bar_rpl"."%TID%" ]
| ) [ ]
) [ "foo_rpl"."n", "foo_rpl"."m", "bar_rpl"."n", "bar_rpl"."m" ]
@@ -45,6 +45,22 @@ query ITIT rowsort
select * from foo_rpl, bar_rpl
----
1
+again
+10
+alice
+1
+again
+20
+bob
+1
+again
+20
+mary
+1
+again
+30
+tom
+1
hello
10
alice
@@ -54,6 +70,10 @@ 20
bob
1
hello
+20
+mary
+1
+hello
30
tom
2
@@ -66,6 +86,10 @@ 20
bob
2
world
+20
+mary
+2
+world
30
tom
3
@@ -78,11 +102,15 @@ 20
bob
3
!!
+20
+mary
+3
+!!
30
tom
-# In the next test and given the implentation of the remote optimizer we
-# expect the replicas to be resolved to the remote tables. The optimizer
+# In the next test and given the implentation of the remote optimizer we
+# expect the replicas to be resolved to the remote tables. The optimizer
# could be in principle be adapted to resolve the replica crossproduct
# to local tables
query T nosort
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]