Skip to content

Commit

Permalink
fix: New test case
Browse files Browse the repository at this point in the history
  • Loading branch information
can-keklik committed Oct 24, 2024
1 parent e32053c commit ae5dcb5
Showing 1 changed file with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#[name=two_way_simple, run=plan]>

SELECT * FROM books b
INNER JOIN categories c ON b.category_id = c.id
WHERE c.name = 'Science';

---

- filter (c.name IsEqual Str("Science")):
- join [Inner, (b.category_id IsEqual c.id)]:
- scan [books as b]
Expand All @@ -23,4 +26,21 @@ SELECT * FROM books b
- join [Inner, (b.category_id IsEqual c.id)]:
- scan [books as b]
- scan [categories as c]
- scan [publishers as p]
- scan [publishers as p]


#[name=three_way_reordered, run=plan]>

SELECT * FROM books b
INNER JOIN
(categories c ON b.category_id = c.id INNER JOIN publishers AS p ON b.publisher_id = p.id)
WHERE p.name = 'Springer';

---

- filter (p.name IsEqual Str("Springer")):
- join [Inner, (b.publisher_id IsEqual p.id)]:
- join [Inner, (b.category_id IsEqual c.id)]:
- scan [categories as c]
- scan [publishers as p]
- scan [books as b]

0 comments on commit ae5dcb5

Please sign in to comment.