Changeset: 156e5147988c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/156e5147988c
Added Files:
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.py
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.reqtests
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.sql
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out.32bit
Modified Files:
        sql/test/FeatureRequests/Tests/All
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test
Branch: default
Log Message:

Split 32-bit and 64-bit outputs


diffs (264 lines):

diff --git a/sql/test/FeatureRequests/Tests/All 
b/sql/test/FeatureRequests/Tests/All
--- a/sql/test/FeatureRequests/Tests/All
+++ b/sql/test/FeatureRequests/Tests/All
@@ -5,6 +5,7 @@ foreign_key_outer_join_dead_code_elimina
 foreign_key_outer_join_dead_code_elimination-plan-1join-view
 foreign_key_outer_join_dead_code_elimination-plan-2join-query
 foreign_key_outer_join_dead_code_elimination-plan-2join-view
+foreign_key_outer_join_dead_code_elimination-plan-3join-query
 foreign_key_outer_join_dead_code_elimination-explain-0join-query
 foreign_key_outer_join_dead_code_elimination-explain-0join-view
 foreign_key_outer_join_dead_code_elimination-explain-1join-query
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test
--- 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test
@@ -104,26 +104,6 @@ project (
 ) [ "fk"."id" HASHCOL , "pk2"."v2" ] [ "fk"."id" ASC HASHCOL  ]
 
 query T nosort
-   plan select count(*) from pk1 join fk on fk.fk1 = pk1.pk1
-----
-project (
-| group by (
-| | select (
-| | | table("sys"."fk") [ "fk"."%fk_fk1_fkey" JOINIDX "sys"."fk"."fk_fk1_fkey" 
]
-| | ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(63) "NULL") ]
-| ) [  ] [ "sys"."count"() NOT NULL as "%1"."%1" ]
-) [ "%1"."%1" NOT NULL ]
-
-query T nosort
-   plan select id       from pk1 join fk on fk.fk1 = pk1.pk1 order by id
-----
-project (
-| select (
-| | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey" ]
-| ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(63) "NULL") ]
-) [ "fk"."id" NOT NULL HASHCOL  ] [ "fk"."id" ASC NOT NULL HASHCOL  ]
-
-query T nosort
    plan select id , v1  from pk1 join fk on fk.fk1 = pk1.pk1 order by id
 ----
 project (
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test
--- 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test
@@ -112,50 +112,6 @@ project (
 | ) [ ("fk"."%fk_fk2_fkey") = ("pk2"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
 ) [ "fk"."id" HASHCOL , "pk2"."v2" ] [ "fk"."id" ASC HASHCOL  ]
 
-query T nosort
-   plan select count(*) from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on 
fk.fk2 = pk2.pk2
-----
-project (
-| group by (
-| | select (
-| | | table("sys"."fk") [ "fk"."%fk_fk1_fkey" JOINIDX 
"sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX "sys"."fk"."fk_fk2_fkey" ]
-| | ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(63) "NULL"), ("fk"."%fk_fk1_fkey") ! 
* = (oid(63) "NULL") ]
-| ) [  ] [ "sys"."count"() NOT NULL as "%1"."%1" ]
-) [ "%1"."%1" NOT NULL ]
-
-query T nosort
-   plan select id       from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on 
fk.fk2 = pk2.pk2 order by id
-----
-project (
-| select (
-| | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
-| ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(63) "NULL"), ("fk"."%fk_fk1_fkey") ! * 
= (oid(63) "NULL") ]
-) [ "fk"."id" NOT NULL HASHCOL  ] [ "fk"."id" ASC NOT NULL HASHCOL  ]
-
-query T nosort
-   plan select id , v1  from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on 
fk.fk2 = pk2.pk2 order by id
-----
-project (
-| join (
-| | select (
-| | | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
-| | ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(63) "NULL") ],
-| | table("sys"."pk1") [ "pk1"."v1", "pk1"."%TID%" NOT NULL ]
-| ) [ ("fk"."%fk_fk1_fkey") = ("pk1"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk1_fkey" ]
-) [ "fk"."id" NOT NULL HASHCOL , "pk1"."v1" ] [ "fk"."id" ASC NOT NULL HASHCOL 
 ]
-
-query T nosort
-   plan select id , v2  from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on 
fk.fk2 = pk2.pk2 order by id
-----
-project (
-| join (
-| | select (
-| | | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
-| | ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(63) "NULL") ],
-| | table("sys"."pk2") [ "pk2"."v2", "pk2"."%TID%" NOT NULL ]
-| ) [ ("fk"."%fk_fk2_fkey") = ("pk2"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
-) [ "fk"."id" NOT NULL HASHCOL , "pk2"."v2" ] [ "fk"."id" ASC NOT NULL HASHCOL 
 ]
-
 statement ok
 set optimizer = 'default_pipe'
 
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.py
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.py
new file mode 100644
--- /dev/null
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.py
@@ -0,0 +1,9 @@
+from MonetDBtesting.sqltest import SQLTestCase
+import os
+
+with SQLTestCase() as tc:
+    tc.connect()
+    with 
open('foreign_key_outer_join_dead_code_elimination-plan-3join-query.sql') as f:
+        suffix = '.32bit' if os.getenv('TST_BITS', '') == '32bit' else ''
+        tc.execute(query=None, client='mclient', stdin=f)\
+            
.assertMatchStableOut(fout='foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out%s'
 % (suffix))
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.reqtests
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.reqtests
new file mode 100644
--- /dev/null
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.reqtests
@@ -0,0 +1,1 @@
+foreign_key_outer_join_dead_code_elimination-prologue
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.sql
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.sql
new file mode 100644
--- /dev/null
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.sql
@@ -0,0 +1,6 @@
+plan select count(*) from pk1 join fk on fk.fk1 = pk1.pk1;
+plan select id from pk1 join fk on fk.fk1 = pk1.pk1 order by id;
+plan select count(*) from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on fk.fk2 
= pk2.pk2;
+plan select id from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on fk.fk2 = 
pk2.pk2 order by id;
+plan select id, v1 from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on fk.fk2 = 
pk2.pk2 order by id;
+plan select id, v2 from pk2 join (pk1 join fk on fk.fk1 = pk1.pk1) on fk.fk2 = 
pk2.pk2 order by id;
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out
new file mode 100644
--- /dev/null
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out
@@ -0,0 +1,64 @@
+% .plan # table_name
+% rel # name
+% clob # type
+% 80 # length
+project (
+| group by (
+| | select (
+| | | table("sys"."fk") [ "fk"."%fk_fk1_fkey" JOINIDX "sys"."fk"."fk_fk1_fkey" 
]
+| | ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(63) "NULL") ]
+| ) [  ] [ "sys"."count"() NOT NULL as "%1"."%1" ]
+) [ "%1"."%1" NOT NULL ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 107 # length
+project (
+| select (
+| | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey" ]
+| ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(63) "NULL") ]
+) [ "fk"."id" NOT NULL HASHCOL  ] [ "fk"."id" ASC NOT NULL HASHCOL  ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 134 # length
+project (
+| group by (
+| | select (
+| | | table("sys"."fk") [ "fk"."%fk_fk1_fkey" JOINIDX 
"sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX "sys"."fk"."fk_fk2_fkey" ]
+| | ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(63) "NULL"), ("fk"."%fk_fk1_fkey") ! 
* = (oid(63) "NULL") ]
+| ) [  ] [ "sys"."count"() NOT NULL as "%1"."%1" ]
+) [ "%1"."%1" NOT NULL ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 161 # length
+project (
+| select (
+| | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+| ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(63) "NULL"), ("fk"."%fk_fk1_fkey") ! * 
= (oid(63) "NULL") ]
+) [ "fk"."id" NOT NULL HASHCOL  ] [ "fk"."id" ASC NOT NULL HASHCOL  ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 163 # length
+project (
+| join (
+| | select (
+| | | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+| | ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(63) "NULL") ],
+| | table("sys"."pk1") [ "pk1"."v1", "pk1"."%TID%" NOT NULL ]
+| ) [ ("fk"."%fk_fk1_fkey") = ("pk1"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk1_fkey" ]
+) [ "fk"."id" NOT NULL HASHCOL , "pk1"."v1" ] [ "fk"."id" ASC NOT NULL HASHCOL 
 ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 163 # length
+project (
+| join (
+| | select (
+| | | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+| | ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(63) "NULL") ],
+| | table("sys"."pk2") [ "pk2"."v2", "pk2"."%TID%" NOT NULL ]
+| ) [ ("fk"."%fk_fk2_fkey") = ("pk2"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+) [ "fk"."id" NOT NULL HASHCOL , "pk2"."v2" ] [ "fk"."id" ASC NOT NULL HASHCOL 
 ]
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out.32bit
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out.32bit
new file mode 100644
--- /dev/null
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-3join-query.stable.out.32bit
@@ -0,0 +1,64 @@
+% .plan # table_name
+% rel # name
+% clob # type
+% 80 # length
+project (
+| group by (
+| | select (
+| | | table("sys"."fk") [ "fk"."%fk_fk1_fkey" JOINIDX "sys"."fk"."fk_fk1_fkey" 
]
+| | ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(31) "NULL") ]
+| ) [  ] [ "sys"."count"() NOT NULL as "%1"."%1" ]
+) [ "%1"."%1" NOT NULL ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 107 # length
+project (
+| select (
+| | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey" ]
+| ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(31) "NULL") ]
+) [ "fk"."id" NOT NULL HASHCOL  ] [ "fk"."id" ASC NOT NULL HASHCOL  ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 134 # length
+project (
+| group by (
+| | select (
+| | | table("sys"."fk") [ "fk"."%fk_fk1_fkey" JOINIDX 
"sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX "sys"."fk"."fk_fk2_fkey" ]
+| | ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(31) "NULL"), ("fk"."%fk_fk1_fkey") ! 
* = (oid(31) "NULL") ]
+| ) [  ] [ "sys"."count"() NOT NULL as "%1"."%1" ]
+) [ "%1"."%1" NOT NULL ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 161 # length
+project (
+| select (
+| | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+| ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(31) "NULL"), ("fk"."%fk_fk1_fkey") ! * 
= (oid(31) "NULL") ]
+) [ "fk"."id" NOT NULL HASHCOL  ] [ "fk"."id" ASC NOT NULL HASHCOL  ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 163 # length
+project (
+| join (
+| | select (
+| | | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+| | ) [ ("fk"."%fk_fk2_fkey") ! * = (oid(31) "NULL") ],
+| | table("sys"."pk1") [ "pk1"."v1", "pk1"."%TID%" NOT NULL ]
+| ) [ ("fk"."%fk_fk1_fkey") = ("pk1"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk1_fkey" ]
+) [ "fk"."id" NOT NULL HASHCOL , "pk1"."v1" ] [ "fk"."id" ASC NOT NULL HASHCOL 
 ]
+% .plan # table_name
+% rel # name
+% clob # type
+% 163 # length
+project (
+| join (
+| | select (
+| | | table("sys"."fk") [ "fk"."id" NOT NULL HASHCOL , "fk"."%fk_fk1_fkey" 
JOINIDX "sys"."fk"."fk_fk1_fkey", "fk"."%fk_fk2_fkey" JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+| | ) [ ("fk"."%fk_fk1_fkey") ! * = (oid(31) "NULL") ],
+| | table("sys"."pk2") [ "pk2"."v2", "pk2"."%TID%" NOT NULL ]
+| ) [ ("fk"."%fk_fk2_fkey") = ("pk2"."%TID%" NOT NULL) JOINIDX 
"sys"."fk"."fk_fk2_fkey" ]
+) [ "fk"."id" NOT NULL HASHCOL , "pk2"."v2" ] [ "fk"."id" ASC NOT NULL HASHCOL 
 ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to