Changeset: e43ff4c94a81 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e43ff4c94a81
Modified Files:
        sql/test/strimps/Tests/persisted_strimp.SQL.py
        sql/test/strimps/Tests/strimps_stable_counts.SQL.py
Branch: strimps_update
Log Message:

Fix strimps tests

After the SQL interface change, strimps need to be created explicitly.


diffs (31 lines):

diff --git a/sql/test/strimps/Tests/persisted_strimp.SQL.py 
b/sql/test/strimps/Tests/persisted_strimp.SQL.py
--- a/sql/test/strimps/Tests/persisted_strimp.SQL.py
+++ b/sql/test/strimps/Tests/persisted_strimp.SQL.py
@@ -37,6 +37,10 @@ with tempfile.TemporaryDirectory() as fa
             mdb.execute("""COPY 15000 RECORDS INTO orders from 
r'{}/sql/benchmarks/tpch/SF-0.01/orders.tbl' USING DELIMITERS 
'|','\n','"';""".format(os.getenv('TSTSRCBASE'))).assertSucceeded()
             mdb.execute("""COPY 15000 RECORDS INTO orders from 
r'{}/sql/benchmarks/tpch/SF-0.01/orders.tbl' USING DELIMITERS 
'|','\n','"';""".format(os.getenv('TSTSRCBASE'))).assertSucceeded()
             mdb.execute("""COPY 15000 RECORDS INTO orders from 
r'{}/sql/benchmarks/tpch/SF-0.01/orders.tbl' USING DELIMITERS 
'|','\n','"';""".format(os.getenv('TSTSRCBASE'))).assertSucceeded()
+            # Create strimp
+            mdb.execute("ALTER TABLE orders SET READ ONLY;")
+            mdb.execute("CREATE IMPRINTS INDEX o_comment_strimp ON 
orders(o_comment);")
+
             mdb.execute("SELECT COUNT(*) FROM orders WHERE o_comment LIKE 
'%%slyly%%';").assertSucceeded().assertDataResultMatch([(12896,)])
         s.communicate()
 
diff --git a/sql/test/strimps/Tests/strimps_stable_counts.SQL.py 
b/sql/test/strimps/Tests/strimps_stable_counts.SQL.py
--- a/sql/test/strimps/Tests/strimps_stable_counts.SQL.py
+++ b/sql/test/strimps/Tests/strimps_stable_counts.SQL.py
@@ -40,10 +40,12 @@ with tempfile.TemporaryDirectory() as fa
         s.communicate()
 
     with process.server(mapiport='0', dbname='db1',
-                        args=["--set", "gdk_use_strimps=yes",],
                         dbfarm=fdir,
                         stdin=process.PIPE, stdout=process.PIPE, 
stderr=process.PIPE) as s:
         with SQLTestCase() as mdb:
             mdb.connect(database='db1', port=s.dbport, username='monetdb', 
password='monetdb')
+            # Create strimp
+            mdb.execute("ALTER TABLE orders SET READ ONLY;")
+            mdb.execute("CREATE IMPRINTS INDEX o_comment_strimp ON 
orders(o_comment);")
             mdb.execute("SELECT COUNT(*) FROM orders WHERE o_comment LIKE 
'%%slyly%%';").assertSucceeded().assertDataResultMatch([(12896,)])
         s.communicate()
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to