{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/2720","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/2720/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/2720/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/2720/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/2720","id":38217454,"number":2720,"title":"ReQL proposal: modernizing joins","user":{"login":"coffeemug","id":48436,"avatar_url":"https://avatars.githubusercontent.com/u/48436?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeemug","html_url":"https://github.com/coffeemug","followers_url":"https://api.github.com/users/coffeemug/followers","following_url":"https://api.github.com/users/coffeemug/following{/other_user}","gists_url":"https://api.github.com/users/coffeemug/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeemug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeemug/subscriptions","organizations_url":"https://api.github.com/users/coffeemug/orgs","repos_url":"https://api.github.com/users/coffeemug/repos","events_url":"https://api.github.com/users/coffeemug/events{/privacy}","received_events_url":"https://api.github.com/users/coffeemug/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/tp:RQL_proposal","name":"tp:RQL_proposal","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/41","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/41/labels","id":367201,"number":41,"title":"subsequent","description":"","creator":{"login":"coffeemug","id":48436,"avatar_url":"https://avatars.githubusercontent.com/u/48436?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeemug","html_url":"https://github.com/coffeemug","followers_url":"https://api.github.com/users/coffeemug/followers","following_url":"https://api.github.com/users/coffeemug/following{/other_user}","gists_url":"https://api.github.com/users/coffeemug/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeemug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeemug/subscriptions","organizations_url":"https://api.github.com/users/coffeemug/orgs","repos_url":"https://api.github.com/users/coffeemug/repos","events_url":"https://api.github.com/users/coffeemug/events{/privacy}","received_events_url":"https://api.github.com/users/coffeemug/received_events","type":"User","site_admin":false},"open_issues":345,"closed_issues":0,"state":"open","created_at":"2013-06-30T07:32:52Z","updated_at":"2015-02-13T20:26:12Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2014-07-18T22:32:07Z","updated_at":"2015-02-16T19:22:21Z","closed_at":null,"body":"We've learned a lot about how people use joins, and I think we can have a much cleaner, elegant, and useful API. I propose making the following changes:\r\n\r\n- Drop `innerJoin` and `outerJoin` commands. They're too slow for use in a realtime system, and everyone ends up creating an index and using `eqJoin` because these commands are effectively unusable for performance reasons.\r\n- Rename `eqJoin` to `join`.\r\n- Add more optargs to control behavior of `join`\r\n  - `include_missing` (defaults to `true`). This optarg would essentially provide outer join behavior. If a row isn't found in the right table, it would be included into the resultset anyway, with the right value set to `null`.\r\n  - `group` (defaults to `true`). If this optarg is set to false, the join command would operate as it does now. If it's set to true, it would group the right values into an array and inject them into the row via a `'joined'` field. If it's a string, it would act in a similar way to when it's set to `true` but the `'joined'` field would be renamed to the string. If the field name already exists in the document, it should be overwritten.\r\n  - `multi` (defaults to `false`). If this optarg is set to false, the join command operates as it does now. If it's set to `true`, the left field argument is treated as an array of ids, and the join command joins in each field from the rightmost table that exists in this array.\r\n\r\nSupersedes #1223, #1168, #1152, #2008."},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/74559376","html_url":"https://github.com/rethinkdb/rethinkdb/issues/2720#issuecomment-74559376","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/2720","id":74559376,"user":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T19:22:21Z","updated_at":"2015-02-16T19:22:21Z","body":"@geddski This got delayed because of some other more urgent features we're working on. Is there a particular aspect of this that you need?"}}