diff --git a/lykiadb-server/tests/planner/join/join b/lykiadb-server/tests/planner/join similarity index 59% rename from lykiadb-server/tests/planner/join/join rename to lykiadb-server/tests/planner/join index 12e4c0f4..3fb2538b 100644 --- a/lykiadb-server/tests/planner/join/join +++ b/lykiadb-server/tests/planner/join @@ -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] @@ -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] \ No newline at end of file + - 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] \ No newline at end of file