mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 13:22:57 +00:00
test: Sqlness tests for distribute mode (#979)
* test: Sqlness tests for distribute mode * ci * fix: resolve PR comments * fix: resolve PR comments
This commit is contained in:
49
tests/cases/distributed/optimizer/filter_push_down.result
Normal file
49
tests/cases/distributed/optimizer/filter_push_down.result
Normal file
@@ -0,0 +1,49 @@
|
||||
CREATE TABLE integers(i INTEGER, j BIGINT TIME INDEX);
|
||||
|
||||
Affected Rows: 0
|
||||
|
||||
INSERT INTO integers VALUES (1, 1), (2, 2), (3, 3), (NULL, 4);
|
||||
|
||||
Affected Rows: 4
|
||||
|
||||
SELECT i1.i, i2.i FROM integers i1, integers i2 WHERE i1.i=i2.i ORDER BY 1;
|
||||
|
||||
+---+---+
|
||||
| i | i |
|
||||
+---+---+
|
||||
| 1 | 1 |
|
||||
| 2 | 2 |
|
||||
| 3 | 3 |
|
||||
+---+---+
|
||||
|
||||
SELECT i1.i,i2.i FROM integers i1, integers i2 WHERE i1.i=i2.i AND i1.i>1 ORDER BY 1;
|
||||
|
||||
+---+---+
|
||||
| i | i |
|
||||
+---+---+
|
||||
| 2 | 2 |
|
||||
| 3 | 3 |
|
||||
+---+---+
|
||||
|
||||
SELECT i1.i,i2.i,i3.i FROM integers i1, integers i2, integers i3 WHERE i1.i=i2.i AND i1.i=i3.i AND i1.i>1 ORDER BY 1;
|
||||
|
||||
+---+---+---+
|
||||
| i | i | i |
|
||||
+---+---+---+
|
||||
| 2 | 2 | 2 |
|
||||
| 3 | 3 | 3 |
|
||||
+---+---+---+
|
||||
|
||||
SELECT i1.i,i2.i FROM integers i1 JOIN integers i2 ON i1.i=i2.i WHERE i1.i>1 ORDER BY 1;
|
||||
|
||||
+---+---+
|
||||
| i | i |
|
||||
+---+---+
|
||||
| 2 | 2 |
|
||||
| 3 | 3 |
|
||||
+---+---+
|
||||
|
||||
DROP TABLE integers;
|
||||
|
||||
Affected Rows: 1
|
||||
|
||||
15
tests/cases/distributed/optimizer/filter_push_down.sql
Normal file
15
tests/cases/distributed/optimizer/filter_push_down.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE integers(i INTEGER, j BIGINT TIME INDEX);
|
||||
|
||||
INSERT INTO integers VALUES (1, 1), (2, 2), (3, 3), (NULL, 4);
|
||||
|
||||
SELECT i1.i, i2.i FROM integers i1, integers i2 WHERE i1.i=i2.i ORDER BY 1;
|
||||
|
||||
SELECT i1.i,i2.i FROM integers i1, integers i2 WHERE i1.i=i2.i AND i1.i>1 ORDER BY 1;
|
||||
|
||||
SELECT i1.i,i2.i,i3.i FROM integers i1, integers i2, integers i3 WHERE i1.i=i2.i AND i1.i=i3.i AND i1.i>1 ORDER BY 1;
|
||||
|
||||
SELECT i1.i,i2.i FROM integers i1 JOIN integers i2 ON i1.i=i2.i WHERE i1.i>1 ORDER BY 1;
|
||||
|
||||
-- TODO(LFC): Resolve #790, then port remaining test case from standalone.
|
||||
|
||||
DROP TABLE integers;
|
||||
Reference in New Issue
Block a user