Changeset: e460d2349c8e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e460d2349c8e
Added Files:
testing/plan.py
Modified Files:
sql/test/rel-optimizers/Tests/split-select.test
testing/CMakeLists.txt
Branch: groupjoin
Log Message:
simplify output (hugeint->bigint)
diffs (53 lines):
diff --git a/sql/test/rel-optimizers/Tests/split-select.test
b/sql/test/rel-optimizers/Tests/split-select.test
--- a/sql/test/rel-optimizers/Tests/split-select.test
+++ b/sql/test/rel-optimizers/Tests/split-select.test
@@ -5,14 +5,14 @@ statement ok
insert into integers values(1),(2),(3),(NULL)
# split case into project under select
-query T nosort
+query T python .plan.filter
plan select i from integers where case i when i*i then i else i end > 1
----
project (
| select (
| | project (
| | | table("sys"."integers") [ "integers"."i" ]
-| | ) [ "integers"."i", "sys"."casewhen"(hugeint(64)["integers"."i"],
"sys"."sql_mul"("integers"."i", "integers"."i"), "integers"."i",
"integers"."i") as "%1"."%1" ]
+| | ) [ "integers"."i", "sys"."casewhen"(bigint(63)["integers"."i"],
"sys"."sql_mul"("integers"."i", "integers"."i"), "integers"."i",
"integers"."i") as "%1"."%1" ]
| ) [ ("%1"."%1") > (int(32) "1") ]
) [ "integers"."i" ]
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -139,6 +139,7 @@ if(PYTHON3_LIBDIR)
melcheck.py
sqllogictest.py
explain.py
+ plan.py
mapicursor.py
malmapi.py
helpers.py
diff --git a/testing/plan.py b/testing/plan.py
new file mode 100644
--- /dev/null
+++ b/testing/plan.py
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
+
+import re
+
+def filter(tab):
+ res = []
+ for row in tab:
+ if row[0].find('usec') < 0:
+ s = re.sub(r'hugeint\(64\)', r'bigint(63)', row[0])
+ res.append([s])
+ return res
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]