{"action":"created","comment":{"url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/comments/303158256","pull_request_review_id":261487168,"id":303158256,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMzE1ODI1Ng==","diff_hunk":"@@ -0,0 +1,137 @@\n+/*\n+ * JoinedRecordType.java\n+ *\n+ * This source file is part of the FoundationDB open source project\n+ *\n+ * Copyright 2015-2019 Apple Inc. and the FoundationDB project authors\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.apple.foundationdb.record.metadata;\n+\n+import com.apple.foundationdb.annotation.API;\n+import com.apple.foundationdb.record.RecordMetaData;\n+import com.apple.foundationdb.record.RecordMetaDataProto;\n+import com.apple.foundationdb.record.metadata.expressions.KeyExpression;\n+import com.apple.foundationdb.record.metadata.expressions.LiteralKeyExpression;\n+import com.google.protobuf.Descriptors;\n+\n+import javax.annotation.Nonnull;\n+import java.util.List;\n+\n+/**\n+ * A <i>synthetic</i> record type representing the indexable result of <em>joining</em> stored records.\n+ */\n+@API(API.Status.EXPERIMENTAL)\n+public class JoinedRecordType extends SyntheticRecordType<JoinedRecordType.JoinConstituent> {\n+\n+    @Nonnull\n+    private final List<Join> joins;\n+\n+    /**\n+     * A constituent type within a joined record type.\n+     */\n+    public static class JoinConstituent extends SyntheticRecordType.Constituent {\n+        private final boolean outerJoined;\n+\n+        protected JoinConstituent(String name, RecordType recordType, boolean outerJoined) {\n+            super(name, recordType);\n+            this.outerJoined = outerJoined;\n+        }\n+\n+        public boolean isOuterJoined() {\n+            return outerJoined;\n+        }\n+    }\n+\n+    /**\n+     * An equi-join between constituent types.\n+     */\n+    public static class Join {\n+        @Nonnull\n+        private final JoinConstituent left;\n+        @Nonnull\n+        private final KeyExpression leftExpression;\n+        @Nonnull\n+        private final JoinConstituent right;\n+        @Nonnull\n+        private final KeyExpression rightExpression;\n+\n+        protected Join(@Nonnull JoinConstituent left, @Nonnull KeyExpression leftExpression,","path":"fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/metadata/JoinedRecordType.java","position":71,"original_position":71,"commit_id":"aad1bc843b13acf965a6e604befb14b023f2b77f","original_commit_id":"aad1bc843b13acf965a6e604befb14b023f2b77f","user":{"login":"MMcM","id":666589,"node_id":"MDQ6VXNlcjY2NjU4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/666589?v=4","gravatar_id":"","url":"https://api.github.com/users/MMcM","html_url":"https://github.com/MMcM","followers_url":"https://api.github.com/users/MMcM/followers","following_url":"https://api.github.com/users/MMcM/following{/other_user}","gists_url":"https://api.github.com/users/MMcM/gists{/gist_id}","starred_url":"https://api.github.com/users/MMcM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MMcM/subscriptions","organizations_url":"https://api.github.com/users/MMcM/orgs","repos_url":"https://api.github.com/users/MMcM/repos","events_url":"https://api.github.com/users/MMcM/events{/privacy}","received_events_url":"https://api.github.com/users/MMcM/received_events","type":"User","site_admin":false},"body":"Yes, I think so, eventually. I am actually not sure whether it'd be better to express them differently in the meta-data or just have the planner recognize them from binary ones.","created_at":"2019-07-12T21:42:29Z","updated_at":"2019-07-12T21:42:29Z","html_url":"https://github.com/FoundationDB/fdb-record-layer/pull/306#discussion_r303158256","pull_request_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/comments/303158256"},"html":{"href":"https://github.com/FoundationDB/fdb-record-layer/pull/306#discussion_r303158256"},"pull_request":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306"}},"in_reply_to_id":296841011},"pull_request":{"url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306","id":244633391,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ0NjMzMzkx","html_url":"https://github.com/FoundationDB/fdb-record-layer/pull/306","diff_url":"https://github.com/FoundationDB/fdb-record-layer/pull/306.diff","patch_url":"https://github.com/FoundationDB/fdb-record-layer/pull/306.patch","issue_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues/306","number":306,"state":"open","locked":false,"title":"Resolves #159: Join indexes","user":{"login":"MMcM","id":666589,"node_id":"MDQ6VXNlcjY2NjU4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/666589?v=4","gravatar_id":"","url":"https://api.github.com/users/MMcM","html_url":"https://github.com/MMcM","followers_url":"https://api.github.com/users/MMcM/followers","following_url":"https://api.github.com/users/MMcM/following{/other_user}","gists_url":"https://api.github.com/users/MMcM/gists{/gist_id}","starred_url":"https://api.github.com/users/MMcM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MMcM/subscriptions","organizations_url":"https://api.github.com/users/MMcM/orgs","repos_url":"https://api.github.com/users/MMcM/repos","events_url":"https://api.github.com/users/MMcM/events{/privacy}","received_events_url":"https://api.github.com/users/MMcM/received_events","type":"User","site_admin":false},"body":"Supersedes #160.","created_at":"2019-01-15T00:12:40Z","updated_at":"2019-07-12T21:42:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ab124000c710a70cfd52769040465dd409ef066","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306/commits","review_comments_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306/comments","review_comment_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues/306/comments","statuses_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/statuses/aad1bc843b13acf965a6e604befb14b023f2b77f","head":{"label":"MMcM:simple-join-indexes","ref":"simple-join-indexes","sha":"aad1bc843b13acf965a6e604befb14b023f2b77f","user":{"login":"MMcM","id":666589,"node_id":"MDQ6VXNlcjY2NjU4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/666589?v=4","gravatar_id":"","url":"https://api.github.com/users/MMcM","html_url":"https://github.com/MMcM","followers_url":"https://api.github.com/users/MMcM/followers","following_url":"https://api.github.com/users/MMcM/following{/other_user}","gists_url":"https://api.github.com/users/MMcM/gists{/gist_id}","starred_url":"https://api.github.com/users/MMcM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MMcM/subscriptions","organizations_url":"https://api.github.com/users/MMcM/orgs","repos_url":"https://api.github.com/users/MMcM/repos","events_url":"https://api.github.com/users/MMcM/events{/privacy}","received_events_url":"https://api.github.com/users/MMcM/received_events","type":"User","site_admin":false},"repo":{"id":165754297,"node_id":"MDEwOlJlcG9zaXRvcnkxNjU3NTQyOTc=","name":"fdb-record-layer","full_name":"MMcM/fdb-record-layer","private":false,"owner":{"login":"MMcM","id":666589,"node_id":"MDQ6VXNlcjY2NjU4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/666589?v=4","gravatar_id":"","url":"https://api.github.com/users/MMcM","html_url":"https://github.com/MMcM","followers_url":"https://api.github.com/users/MMcM/followers","following_url":"https://api.github.com/users/MMcM/following{/other_user}","gists_url":"https://api.github.com/users/MMcM/gists{/gist_id}","starred_url":"https://api.github.com/users/MMcM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MMcM/subscriptions","organizations_url":"https://api.github.com/users/MMcM/orgs","repos_url":"https://api.github.com/users/MMcM/repos","events_url":"https://api.github.com/users/MMcM/events{/privacy}","received_events_url":"https://api.github.com/users/MMcM/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MMcM/fdb-record-layer","description":"A record-oriented store built on FoundationDB","fork":true,"url":"https://api.github.com/repos/MMcM/fdb-record-layer","forks_url":"https://api.github.com/repos/MMcM/fdb-record-layer/forks","keys_url":"https://api.github.com/repos/MMcM/fdb-record-layer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MMcM/fdb-record-layer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MMcM/fdb-record-layer/teams","hooks_url":"https://api.github.com/repos/MMcM/fdb-record-layer/hooks","issue_events_url":"https://api.github.com/repos/MMcM/fdb-record-layer/issues/events{/number}","events_url":"https://api.github.com/repos/MMcM/fdb-record-layer/events","assignees_url":"https://api.github.com/repos/MMcM/fdb-record-layer/assignees{/user}","branches_url":"https://api.github.com/repos/MMcM/fdb-record-layer/branches{/branch}","tags_url":"https://api.github.com/repos/MMcM/fdb-record-layer/tags","blobs_url":"https://api.github.com/repos/MMcM/fdb-record-layer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MMcM/fdb-record-layer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MMcM/fdb-record-layer/git/refs{/sha}","trees_url":"https://api.github.com/repos/MMcM/fdb-record-layer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MMcM/fdb-record-layer/statuses/{sha}","languages_url":"https://api.github.com/repos/MMcM/fdb-record-layer/languages","stargazers_url":"https://api.github.com/repos/MMcM/fdb-record-layer/stargazers","contributors_url":"https://api.github.com/repos/MMcM/fdb-record-layer/contributors","subscribers_url":"https://api.github.com/repos/MMcM/fdb-record-layer/subscribers","subscription_url":"https://api.github.com/repos/MMcM/fdb-record-layer/subscription","commits_url":"https://api.github.com/repos/MMcM/fdb-record-layer/commits{/sha}","git_commits_url":"https://api.github.com/repos/MMcM/fdb-record-layer/git/commits{/sha}","comments_url":"https://api.github.com/repos/MMcM/fdb-record-layer/comments{/number}","issue_comment_url":"https://api.github.com/repos/MMcM/fdb-record-layer/issues/comments{/number}","contents_url":"https://api.github.com/repos/MMcM/fdb-record-layer/contents/{+path}","compare_url":"https://api.github.com/repos/MMcM/fdb-record-layer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MMcM/fdb-record-layer/merges","archive_url":"https://api.github.com/repos/MMcM/fdb-record-layer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MMcM/fdb-record-layer/downloads","issues_url":"https://api.github.com/repos/MMcM/fdb-record-layer/issues{/number}","pulls_url":"https://api.github.com/repos/MMcM/fdb-record-layer/pulls{/number}","milestones_url":"https://api.github.com/repos/MMcM/fdb-record-layer/milestones{/number}","notifications_url":"https://api.github.com/repos/MMcM/fdb-record-layer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MMcM/fdb-record-layer/labels{/name}","releases_url":"https://api.github.com/repos/MMcM/fdb-record-layer/releases{/id}","deployments_url":"https://api.github.com/repos/MMcM/fdb-record-layer/deployments","created_at":"2019-01-14T23:59:02Z","updated_at":"2019-03-21T14:19:31Z","pushed_at":"2019-07-12T01:21:59Z","git_url":"git://github.com/MMcM/fdb-record-layer.git","ssh_url":"git@github.com:MMcM/fdb-record-layer.git","clone_url":"https://github.com/MMcM/fdb-record-layer.git","svn_url":"https://github.com/MMcM/fdb-record-layer","homepage":"","size":4195,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FoundationDB:master","ref":"master","sha":"1e43924ad972504d2f56e545773853f12402c10f","user":{"login":"FoundationDB","id":2393912,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzOTM5MTI=","avatar_url":"https://avatars3.githubusercontent.com/u/2393912?v=4","gravatar_id":"","url":"https://api.github.com/users/FoundationDB","html_url":"https://github.com/FoundationDB","followers_url":"https://api.github.com/users/FoundationDB/followers","following_url":"https://api.github.com/users/FoundationDB/following{/other_user}","gists_url":"https://api.github.com/users/FoundationDB/gists{/gist_id}","starred_url":"https://api.github.com/users/FoundationDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoundationDB/subscriptions","organizations_url":"https://api.github.com/users/FoundationDB/orgs","repos_url":"https://api.github.com/users/FoundationDB/repos","events_url":"https://api.github.com/users/FoundationDB/events{/privacy}","received_events_url":"https://api.github.com/users/FoundationDB/received_events","type":"Organization","site_admin":false},"repo":{"id":143344440,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMzNDQ0NDA=","name":"fdb-record-layer","full_name":"FoundationDB/fdb-record-layer","private":false,"owner":{"login":"FoundationDB","id":2393912,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzOTM5MTI=","avatar_url":"https://avatars3.githubusercontent.com/u/2393912?v=4","gravatar_id":"","url":"https://api.github.com/users/FoundationDB","html_url":"https://github.com/FoundationDB","followers_url":"https://api.github.com/users/FoundationDB/followers","following_url":"https://api.github.com/users/FoundationDB/following{/other_user}","gists_url":"https://api.github.com/users/FoundationDB/gists{/gist_id}","starred_url":"https://api.github.com/users/FoundationDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoundationDB/subscriptions","organizations_url":"https://api.github.com/users/FoundationDB/orgs","repos_url":"https://api.github.com/users/FoundationDB/repos","events_url":"https://api.github.com/users/FoundationDB/events{/privacy}","received_events_url":"https://api.github.com/users/FoundationDB/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/FoundationDB/fdb-record-layer","description":"A record-oriented store built on FoundationDB","fork":false,"url":"https://api.github.com/repos/FoundationDB/fdb-record-layer","forks_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/forks","keys_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/teams","hooks_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/hooks","issue_events_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues/events{/number}","events_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/events","assignees_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/assignees{/user}","branches_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/branches{/branch}","tags_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/tags","blobs_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/git/refs{/sha}","trees_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/statuses/{sha}","languages_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/languages","stargazers_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/stargazers","contributors_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/contributors","subscribers_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/subscribers","subscription_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/subscription","commits_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/commits{/sha}","git_commits_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/git/commits{/sha}","comments_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/comments{/number}","issue_comment_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues/comments{/number}","contents_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/contents/{+path}","compare_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/merges","archive_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/downloads","issues_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues{/number}","pulls_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls{/number}","milestones_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/milestones{/number}","notifications_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/labels{/name}","releases_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/releases{/id}","deployments_url":"https://api.github.com/repos/FoundationDB/fdb-record-layer/deployments","created_at":"2018-08-02T20:59:44Z","updated_at":"2019-07-12T21:34:17Z","pushed_at":"2019-07-12T01:22:01Z","git_url":"git://github.com/FoundationDB/fdb-record-layer.git","ssh_url":"git@github.com:FoundationDB/fdb-record-layer.git","clone_url":"https://github.com/FoundationDB/fdb-record-layer.git","svn_url":"https://github.com/FoundationDB/fdb-record-layer","homepage":"","size":4189,"stargazers_count":385,"watchers_count":385,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":42,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":131,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":42,"open_issues":131,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306"},"html":{"href":"https://github.com/FoundationDB/fdb-record-layer/pull/306"},"issue":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues/306"},"comments":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/issues/306/comments"},"review_comments":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306/comments"},"review_comment":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/pulls/306/commits"},"statuses":{"href":"https://api.github.com/repos/FoundationDB/fdb-record-layer/statuses/aad1bc843b13acf965a6e604befb14b023f2b77f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MMcM"}}