Commit 37fccbee authored by cznic's avatar cznic

Implement outer joins. Closes #91.

parent cf385c78
......@@ -1697,8 +1697,8 @@
// containing all nulls, and added to the result set. For the RIGHT JOIN
// variant the discussed rules are used for rows from b not satisfying expr ==
// true and the virtual, all-null row "comes" from a. The FULL JOIN adds the
// respective rows which would be otherwise provided by the separate exections
// of the LEFT JOIN and RIGHT JOIN variants. For additional OUTER JOIN
// respective rows which would be otherwise provided by the separate executions
// of the LEFT JOIN and RIGHT JOIN variants. For more thorough OUTER JOIN
// discussion please see the Wikipedia article at [10].
//
// Recordset ordering
......
......@@ -3,7 +3,7 @@
//TODO Put your favorite license here
// yacc source generated by ebnf2y[1]
// at 2015-04-20 16:16:39.477235607 +0200 CEST
// at 2015-04-20 16:31:03.294528297 +0200 CEST
//
// $ ebnf2y -o ql.y -oe ql.ebnf -start StatementList -pkg ql -p _
//
......
......@@ -10568,3 +10568,28 @@ ORDER BY t.s, employee.LastName;
[B Rafferty 31 31 Sales]
[B Robinson 34 34 Clerical]
[B Smith 34 34 Clerical]
-- S 888 // https://github.com/cznic/ql/issues/91
BEGIN TRANSACTION;
CREATE TABLE t (s string);
INSERT INTO t VALUES ("A"), ("B");
COMMIT;
SELECT *
FROM t, employee
FULL JOIN department
ON employee.DepartmentID == department.DepartmentID
ORDER BY t.s, employee.LastName;
|?t.s, ?employee.LastName, ?employee.DepartmentID, ldepartment.DepartmentID, sdepartment.DepartmentName
[<nil> <nil> <nil> 35 Marketing]
[A Heisenberg 33 33 Engineering]
[A Jones 33 33 Engineering]
[A Rafferty 31 31 Sales]
[A Robinson 34 34 Clerical]
[A Smith 34 34 Clerical]
[A Williams <nil> <nil> <nil>]
[B Heisenberg 33 33 Engineering]
[B Jones 33 33 Engineering]
[B Rafferty 31 31 Sales]
[B Robinson 34 34 Clerical]
[B Smith 34 34 Clerical]
[B Williams <nil> <nil> <nil>]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment