Changeset: 7a6aaf510cfe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7a6aaf510cfe
Modified Files:
        sql/test/miscellaneous/Tests/simple_plans.test
Branch: default
Log Message:

Just testing optimizers


diffs (35 lines):

diff --git a/sql/test/miscellaneous/Tests/simple_plans.test 
b/sql/test/miscellaneous/Tests/simple_plans.test
--- a/sql/test/miscellaneous/Tests/simple_plans.test
+++ b/sql/test/miscellaneous/Tests/simple_plans.test
@@ -456,6 +456,31 @@ select i, j from integers where i = j or
 NULL
 NULL
 
+# (x*c1)*c2 -> x * (c1*c2)
+query T nosort
+plan select (34*another_t.col1)*3 from another_t
+----
+project (
+| table("sys"."another_t") [ "another_t"."col1" ] COUNT 
+) [ "sys"."sql_mul"("another_t"."col1", "sys"."sql_mul"(tinyint "34", tinyint 
"3") NOT NULL) ]
+
+# testing rel_push_count_down optimizer
+query T nosort
+plan select count(*) from another_t t1, another_t t2
+----
+project (
+| project (
+| | crossproduct (
+| | | group by (
+| | | | table("sys"."another_t") [ "another_t"."%TID%" NOT NULL as 
"t1"."%TID%" ] COUNT 
+| | | ) [  ] [ "sys"."count"() NOT NULL as "%2"."%2" ],
+| | | group by (
+| | | | table("sys"."another_t") [ "another_t"."%TID%" NOT NULL as 
"t2"."%TID%" ] COUNT 
+| | | ) [  ] [ "sys"."count"() NOT NULL as "%3"."%3" ]
+| | ) [  ]
+| ) [ "sys"."sql_mul"("%2"."%2" NOT NULL, "%3"."%3" NOT NULL) NOT NULL as 
"%1"."%1" ]
+) [ "%1"."%1" NOT NULL ]
+
 statement ok
 rollback
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to