-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add
where_by_index.slt
to verify the correctness of `IndexSca…
…n` (#148)
- Loading branch information
Showing
6 changed files
with
118 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
statement ok | ||
create table t1(id int primary key, c1 int, c2 int); | ||
|
||
statement ok | ||
copy t1 from 'tests/data/row_20000.csv' ( DELIMITER '|' ); | ||
|
||
statement ok | ||
analyze table t1; | ||
|
||
query IIT | ||
select * from t1 limit 10; | ||
---- | ||
0 1 2 | ||
3 4 5 | ||
6 7 8 | ||
9 10 11 | ||
12 13 14 | ||
15 16 17 | ||
18 19 20 | ||
21 22 23 | ||
24 25 26 | ||
27 28 29 | ||
|
||
query IIT | ||
select * from t1 where id = 0; | ||
---- | ||
0 1 2 | ||
|
||
query IIT | ||
select * from t1 where id = 0 and id != 0 and id = 3; | ||
---- | ||
|
||
query IIT | ||
select * from t1 where id = 0 and id != 0 or id = 3; | ||
---- | ||
3 4 5 | ||
|
||
query IIT | ||
select * from t1 where id > 0 and id = 3; | ||
---- | ||
3 4 5 | ||
|
||
query IIT | ||
select * from t1 where id >= 0 and id <= 3; | ||
---- | ||
0 1 2 | ||
3 4 5 | ||
|
||
query IIT | ||
select * from t1 where id <= 0 and id >= 3; | ||
---- | ||
|
||
query IIT | ||
select * from t1 where id >= 3 or id <= 9 limit 10; | ||
---- | ||
0 1 2 | ||
3 4 5 | ||
6 7 8 | ||
9 10 11 | ||
12 13 14 | ||
15 16 17 | ||
18 19 20 | ||
21 22 23 | ||
24 25 26 | ||
27 28 29 | ||
|
||
query IIT | ||
select * from t1 where id <= 3 or id >= 9 limit 10; | ||
---- | ||
0 1 2 | ||
3 4 5 | ||
9 10 11 | ||
12 13 14 | ||
15 16 17 | ||
18 19 20 | ||
21 22 23 | ||
24 25 26 | ||
27 28 29 | ||
30 31 32 | ||
|
||
query IIT | ||
select * from t1 where (id >= 0 and id <= 3) or (id >= 9 and id <= 12); | ||
---- | ||
0 1 2 | ||
3 4 5 | ||
9 10 11 | ||
12 13 14 | ||
|
||
query IIT | ||
select * from t1 where (id >= 0 or id <= 3) and (id >= 9 or id <= 12) limit 10; | ||
---- | ||
0 1 2 | ||
3 4 5 | ||
6 7 8 | ||
9 10 11 | ||
12 13 14 | ||
15 16 17 | ||
18 19 20 | ||
21 22 23 | ||
24 25 26 | ||
27 28 29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters