Changeset: 1c365201dad5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1c365201dad5
Added Files:
        sql/test/remote/Tests/partition_elim.test
Modified Files:
        testing/explain.py
Branch: mtest
Log Message:

Converted sql/test/remote partition_elim test. A MAL instruction cannot start 
with a numeric character


diffs (292 lines):

diff --git a/sql/test/remote/Tests/partition_elim.test 
b/sql/test/remote/Tests/partition_elim.test
new file mode 100644
--- /dev/null
+++ b/sql/test/remote/Tests/partition_elim.test
@@ -0,0 +1,275 @@
+statement ok
+create merge table test (x double, y double)
+
+statement ok
+create table test1 (x double, y double)
+
+statement ok
+create table test2 (x double, y double)
+
+statement ok
+create table test3 (x double, y double)
+
+statement ok
+create table test4 (x double, y double)
+
+statement ok
+insert into test1 values (1.0, 1.0)
+
+statement ok
+insert into test1 values (2.0, 2.0)
+
+statement ok
+insert into test2 values (3.0, -1.0)
+
+statement ok
+insert into test2 values (4.0, -2.0)
+
+statement ok
+insert into test3 values (3.0, 1.0)
+
+statement ok
+insert into test3 values (6.0, 2.0)
+
+statement ok
+insert into test4 values (7.0, 1.0)
+
+statement ok
+insert into test4 values (10.0, 2.0)
+
+statement ok
+alter table test1 set read only
+
+statement ok
+alter table test2 set read only
+
+statement ok
+alter table test3 set read only
+
+statement ok
+alter table test4 set read only
+
+statement ok
+alter table test add table test1
+
+statement ok
+alter table test add table test2
+
+statement ok
+alter table test add table test3
+
+statement ok
+alter table test add table test4
+
+query R rowsort
+select x from test1 where x between 0 and -1
+----
+
+query R rowsort
+select x from test2 where x between 0 and -1
+----
+
+query R rowsort
+select x from test3 where x between 0 and -1
+----
+
+query R rowsort
+select x from test4 where x between 0 and -1
+----
+
+query R rowsort
+select y from test1 where y between 0 and -1
+----
+
+query R rowsort
+select y from test2 where y between 0 and -1
+----
+
+query R rowsort
+select y from test3 where y between 0 and -1
+----
+
+query R rowsort
+select y from test4 where y between 0 and -1
+----
+
+query R rowsort
+analyze sys.test1 minmax
+----
+
+query R rowsort
+analyze sys.test2 minmax
+----
+
+query R rowsort
+analyze sys.test3 minmax
+----
+
+query R rowsort
+analyze sys.test4 minmax
+----
+
+query T python .explain.function_histogram
+explain select x,y from test where x between 4.0 and 6.0
+----
+user.main
+2
+querylog.define
+1
+language.dataflow
+1
+bat.new
+2
+sql.mvc
+1
+sql.bind
+6
+sql.tid
+3
+algebra.select
+3
+algebra.projection
+6
+mat.packIncrement
+4
+bat.append
+4
+bat.pack
+5
+language.pass
+6
+sql.resultSet
+1
+
+query T python .explain.function_histogram
+explain select x,y from test where x between (7-3) and (7-1)
+----
+user.main
+2
+querylog.define
+1
+language.dataflow
+1
+bat.new
+2
+sql.mvc
+1
+sql.bind
+6
+sql.tid
+3
+algebra.select
+3
+algebra.projection
+6
+mat.packIncrement
+4
+bat.append
+4
+bat.pack
+5
+language.pass
+6
+sql.resultSet
+1
+
+query T python .explain.function_histogram
+explain select x,y from test where x between 4.0 and 6.0 and y between 0.0 and 
2.0
+----
+user.main
+2
+querylog.define
+1
+language.dataflow
+1
+bat.pack
+5
+sql.mvc
+1
+sql.bind
+4
+sql.tid
+2
+algebra.select
+4
+algebra.projection
+4
+mat.packIncrement
+4
+language.pass
+6
+sql.resultSet
+1
+
+query T python .explain.function_histogram
+explain select x,y from test where x between 4.0 and 6.0 and y between 
(1.0-1.0) and (4.0-2.0)
+----
+user.main
+2
+querylog.define
+1
+language.dataflow
+1
+bat.pack
+5
+sql.mvc
+1
+sql.bind
+4
+sql.tid
+2
+algebra.select
+4
+algebra.projection
+4
+mat.packIncrement
+4
+language.pass
+6
+sql.resultSet
+1
+
+query T python .explain.function_histogram
+explain select x,y from test where x between (7-3) and (7-1) and y between 
(1.0-1.0) and (4.0-2.0)
+----
+user.main
+2
+querylog.define
+1
+language.dataflow
+1
+bat.pack
+5
+sql.mvc
+1
+sql.bind
+4
+sql.tid
+2
+algebra.select
+4
+algebra.projection
+4
+mat.packIncrement
+4
+language.pass
+6
+sql.resultSet
+1
+
+statement ok
+drop table test
+
+statement ok
+drop table test1
+
+statement ok
+drop table test2
+
+statement ok
+drop table test3
+
+statement ok
+drop table test4
+
+
diff --git a/testing/explain.py b/testing/explain.py
--- a/testing/explain.py
+++ b/testing/explain.py
@@ -12,7 +12,7 @@ def function_histogram(tab):
     histo = {}
     for row in tab:
         if row[0].find('usec') < 0:
-            g = re.match('.*\s(\w+\.\w+).*;', row[0])
+            g = re.match('.*\s([a-zA-Z_]\w*\.[a-zA-Z_]\w*).*;', row[0])
             if g:
                 f = g.groups(1)[0]
                 if f in histo:
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to