aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/inputs/arithmetic.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/core/src/test/resources/sql-tests/inputs/arithmetic.sql')
-rw-r--r--sql/core/src/test/resources/sql-tests/inputs/arithmetic.sql26
1 files changed, 26 insertions, 0 deletions
diff --git a/sql/core/src/test/resources/sql-tests/inputs/arithmetic.sql b/sql/core/src/test/resources/sql-tests/inputs/arithmetic.sql
new file mode 100644
index 0000000000..cbe40410cd
--- /dev/null
+++ b/sql/core/src/test/resources/sql-tests/inputs/arithmetic.sql
@@ -0,0 +1,26 @@
+
+-- unary minus and plus
+select -100;
+select +230;
+select -5.2;
+select +6.8e0;
+select -key, +key from testdata where key = 2;
+select -(key + 1), - key + 1, +(key + 5) from testdata where key = 1;
+select -max(key), +max(key) from testdata;
+select - (-10);
+select + (-key) from testdata where key = 32;
+select - (+max(key)) from testdata;
+select - - 3;
+select - + 20;
+select + + 100;
+select - - max(key) from testdata;
+select + - key from testdata where key = 33;
+
+-- other arithmetics
+select 1 + 2;
+select 1 - 2;
+select 2 * 5;
+select 5 / 2;
+select 5 div 2;
+select 5 % 3;
+select pmod(-7, 3);