-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from lykia-rs/feature/planner
Planner improvements
- Loading branch information
Showing
8 changed files
with
165 additions
and
27 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
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,58 @@ | ||
#[name=simple_union, run=plan]> | ||
|
||
SELECT * FROM books | ||
UNION | ||
SELECT * FROM books; | ||
|
||
--- | ||
|
||
- compound [Union] | ||
- scan [books as books] | ||
- scan [books as books] | ||
|
||
#[name=simple_intersect, run=plan]> | ||
|
||
SELECT * FROM books | ||
INTERSECT | ||
SELECT * FROM books; | ||
|
||
--- | ||
|
||
- compound [Intersect] | ||
- scan [books as books] | ||
- scan [books as books] | ||
|
||
|
||
#[name=simple_except, run=plan]> | ||
|
||
SELECT * FROM books | ||
EXCEPT | ||
SELECT * FROM books; | ||
|
||
--- | ||
|
||
- compound [Except] | ||
- scan [books as books] | ||
- scan [books as books] | ||
|
||
|
||
#[name=nested, run=plan]> | ||
|
||
SELECT * FROM books where id > 5 | ||
UNION | ||
SELECT * FROM books | ||
INTERSECT | ||
SELECT * FROM books | ||
EXCEPT | ||
SELECT * FROM books; | ||
|
||
--- | ||
|
||
- compound [Union] | ||
- filter (id Greater Num(5.0)): | ||
- scan [books as books] | ||
- compound [Intersect] | ||
- scan [books as books] | ||
- compound [Except] | ||
- scan [books as books] | ||
- scan [books as books] |
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,8 @@ | ||
#[name=simple, run=plan]> | ||
|
||
SELECT * FROM books b where title like '%hello%'; | ||
|
||
--- | ||
|
||
- filter (title Like Str("%hello%")): | ||
- scan [books as b] |
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,16 @@ | ||
#[name=limit, run=plan]> | ||
|
||
SELECT * FROM books limit 4 + 4; | ||
|
||
--- | ||
- limit 8 | ||
- scan [books as books] | ||
|
||
#[name=limit, run=plan]> | ||
|
||
SELECT * FROM books limit 5 + 5 offset 5 + 15; | ||
|
||
--- | ||
- limit 10 | ||
- offset 20 | ||
- scan [books as books] |
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