Files
greptimedb/tests/cases/standalone/common/parser/operator_precedence.result
LFC 9ad6c45913 test: Sqlness tests for distribute mode (#979)
* test: Sqlness tests for distribute mode

* ci

* fix: resolve PR comments

* fix: resolve PR comments
2023-02-14 10:24:09 +08:00

89 lines
2.1 KiB
Plaintext

SELECT 2*3+1;
+--------------------------------+
| Int64(2) * Int64(3) + Int64(1) |
+--------------------------------+
| 7 |
+--------------------------------+
SELECT 1+2*3;
+--------------------------------+
| Int64(1) + Int64(2) * Int64(3) |
+--------------------------------+
| 7 |
+--------------------------------+
SELECT 2^2 + 1;
+--------------------------------+
| Int64(2) # Int64(2) + Int64(1) |
+--------------------------------+
| 1 |
+--------------------------------+
SELECT 1+2^2;
+--------------------------------+
| Int64(1) + Int64(2) # Int64(2) |
+--------------------------------+
| 1 |
+--------------------------------+
SELECT 2*4 / 2;
+--------------------------------+
| Int64(2) * Int64(4) / Int64(2) |
+--------------------------------+
| 4 |
+--------------------------------+
SELECT 2*(4 / 2);
+--------------------------------+
| Int64(2) * Int64(4) / Int64(2) |
+--------------------------------+
| 4 |
+--------------------------------+
SELECT 16/2*4;
+---------------------------------+
| Int64(16) / Int64(2) * Int64(4) |
+---------------------------------+
| 32 |
+---------------------------------+
SELECT (16/2)*4;
+---------------------------------+
| Int64(16) / Int64(2) * Int64(4) |
+---------------------------------+
| 32 |
+---------------------------------+
SELECT 2*3*2;
+--------------------------------+
| Int64(2) * Int64(3) * Int64(2) |
+--------------------------------+
| 12 |
+--------------------------------+
SELECT 2^3*2;
+--------------------------------+
| Int64(2) # Int64(3) * Int64(2) |
+--------------------------------+
| 4 |
+--------------------------------+
SELECT 2*3^2;
+--------------------------------+
| Int64(2) * Int64(3) # Int64(2) |
+--------------------------------+
| 4 |
+--------------------------------+