{"action":"created","comment":{"url":"https://api.github.com/repos/apache/jena/pulls/comments/44383277","id":44383277,"diff_hunk":"@@ -0,0 +1,59 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  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 org.apache.jena.sparql.core.mem;\n+\n+import static org.apache.jena.graph.Node.ANY;\n+\n+import java.util.stream.Stream;\n+\n+import org.apache.jena.graph.Node;\n+import org.apache.jena.sparql.core.Quad;\n+\n+/**\n+ * A simplex or multiplex table of {@link Quad}s. Implementations may wish to override {@link #listGraphNodes()} with a\n+ * more efficient implementation.\n+ *\n+ */\n+public interface QuadTable extends TupleTable<Quad> {\n+\n+\t/**\n+\t * Search the table using a pattern of slots. {@link Node#ANY} or <code>null</code> will work as a wildcard.\n+\t *\n+\t * @param g the graph node of the pattern\n+\t * @param s the subject node of the pattern\n+\t * @param p the predicate node of the pattern\n+\t * @param o the object node of the pattern\n+\t * @return an {@link Stream} of matched quads\n+\t */\n+\tStream<Quad> find(Node g, Node s, Node p, Node o);\n+\n+\t/**\n+\t * Discover the graphs named in the table\n+\t *\n+\t * @return an {@link Stream} of graph names used in this table\n+\t */\n+\tdefault Stream<Node> listGraphNodes() {\n+\t\treturn find(ANY, ANY, ANY, ANY).map(Quad::getGraph).distinct();\n+\t}","path":"jena-arq/src/main/java/org/apache/jena/sparql/core/mem/QuadTable.java","position":53,"original_position":53,"commit_id":"bea4652f373491424ce939a881737a7917ea7861","original_commit_id":"bea4652f373491424ce939a881737a7917ea7861","user":{"login":"afs","id":101362,"avatar_url":"https://avatars.githubusercontent.com/u/101362?v=3","gravatar_id":"","url":"https://api.github.com/users/afs","html_url":"https://github.com/afs","followers_url":"https://api.github.com/users/afs/followers","following_url":"https://api.github.com/users/afs/following{/other_user}","gists_url":"https://api.github.com/users/afs/gists{/gist_id}","starred_url":"https://api.github.com/users/afs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afs/subscriptions","organizations_url":"https://api.github.com/users/afs/orgs","repos_url":"https://api.github.com/users/afs/repos","events_url":"https://api.github.com/users/afs/events{/privacy}","received_events_url":"https://api.github.com/users/afs/received_events","type":"User","site_admin":false},"body":"Given the structure, isn't the top level of any index starting with a G enough to get all the graph names? The key set of the FourTupleMap for GSPO is enough, much faster, no retention of state needed for `distinct()`.","created_at":"2015-11-10T09:04:32Z","updated_at":"2015-11-10T09:04:32Z","html_url":"https://github.com/apache/jena/pull/94#discussion_r44383277","pull_request_url":"https://api.github.com/repos/apache/jena/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/apache/jena/pulls/comments/44383277"},"html":{"href":"https://github.com/apache/jena/pull/94#discussion_r44383277"},"pull_request":{"href":"https://api.github.com/repos/apache/jena/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/apache/jena/pulls/94","id":47675320,"html_url":"https://github.com/apache/jena/pull/94","diff_url":"https://github.com/apache/jena/pull/94.diff","patch_url":"https://github.com/apache/jena/pull/94.patch","issue_url":"https://api.github.com/repos/apache/jena/issues/94","number":94,"state":"open","locked":false,"title":"JENA-624 ","user":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars.githubusercontent.com/u/110994?v=3","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"body":"JENA-624: new in-memory dataset implementation using persistent data structures\r\n\r\nThere are a lot of commits in this: I can squash them if desired, just let me know.\r\n\r\nI will be happy to make any changes, large or small, no matter how numerous, right here in this actual branch and PR so that if/when it gets merged, the history and my authorship is preserved. Thanks!","created_at":"2015-10-14T15:33:31Z","updated_at":"2015-11-10T09:04:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c242f0917b8c65240d7d26a21849a0addbfe72d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/jena/pulls/94/commits","review_comments_url":"https://api.github.com/repos/apache/jena/pulls/94/comments","review_comment_url":"https://api.github.com/repos/apache/jena/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/jena/issues/94/comments","statuses_url":"https://api.github.com/repos/apache/jena/statuses/bea4652f373491424ce939a881737a7917ea7861","head":{"label":"ajs6f:jena-624-dexx","ref":"jena-624-dexx","sha":"bea4652f373491424ce939a881737a7917ea7861","user":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars.githubusercontent.com/u/110994?v=3","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"repo":{"id":25372501,"name":"jena","full_name":"ajs6f/jena","owner":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars.githubusercontent.com/u/110994?v=3","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajs6f/jena","description":"Mirror of Apache Jena","fork":true,"url":"https://api.github.com/repos/ajs6f/jena","forks_url":"https://api.github.com/repos/ajs6f/jena/forks","keys_url":"https://api.github.com/repos/ajs6f/jena/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajs6f/jena/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajs6f/jena/teams","hooks_url":"https://api.github.com/repos/ajs6f/jena/hooks","issue_events_url":"https://api.github.com/repos/ajs6f/jena/issues/events{/number}","events_url":"https://api.github.com/repos/ajs6f/jena/events","assignees_url":"https://api.github.com/repos/ajs6f/jena/assignees{/user}","branches_url":"https://api.github.com/repos/ajs6f/jena/branches{/branch}","tags_url":"https://api.github.com/repos/ajs6f/jena/tags","blobs_url":"https://api.github.com/repos/ajs6f/jena/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajs6f/jena/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajs6f/jena/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajs6f/jena/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajs6f/jena/statuses/{sha}","languages_url":"https://api.github.com/repos/ajs6f/jena/languages","stargazers_url":"https://api.github.com/repos/ajs6f/jena/stargazers","contributors_url":"https://api.github.com/repos/ajs6f/jena/contributors","subscribers_url":"https://api.github.com/repos/ajs6f/jena/subscribers","subscription_url":"https://api.github.com/repos/ajs6f/jena/subscription","commits_url":"https://api.github.com/repos/ajs6f/jena/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajs6f/jena/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajs6f/jena/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajs6f/jena/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajs6f/jena/contents/{+path}","compare_url":"https://api.github.com/repos/ajs6f/jena/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajs6f/jena/merges","archive_url":"https://api.github.com/repos/ajs6f/jena/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajs6f/jena/downloads","issues_url":"https://api.github.com/repos/ajs6f/jena/issues{/number}","pulls_url":"https://api.github.com/repos/ajs6f/jena/pulls{/number}","milestones_url":"https://api.github.com/repos/ajs6f/jena/milestones{/number}","notifications_url":"https://api.github.com/repos/ajs6f/jena/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajs6f/jena/labels{/name}","releases_url":"https://api.github.com/repos/ajs6f/jena/releases{/id}","created_at":"2014-10-17T18:56:02Z","updated_at":"2015-05-04T19:16:39Z","pushed_at":"2015-11-09T21:06:14Z","git_url":"git://github.com/ajs6f/jena.git","ssh_url":"git@github.com:ajs6f/jena.git","clone_url":"https://github.com/ajs6f/jena.git","svn_url":"https://github.com/ajs6f/jena","homepage":null,"size":407166,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"be12606cab9b7107d877635a75dc0069f7689e30","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":7437073,"name":"jena","full_name":"apache/jena","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/jena","description":"Mirror of Apache Jena","fork":false,"url":"https://api.github.com/repos/apache/jena","forks_url":"https://api.github.com/repos/apache/jena/forks","keys_url":"https://api.github.com/repos/apache/jena/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/jena/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/jena/teams","hooks_url":"https://api.github.com/repos/apache/jena/hooks","issue_events_url":"https://api.github.com/repos/apache/jena/issues/events{/number}","events_url":"https://api.github.com/repos/apache/jena/events","assignees_url":"https://api.github.com/repos/apache/jena/assignees{/user}","branches_url":"https://api.github.com/repos/apache/jena/branches{/branch}","tags_url":"https://api.github.com/repos/apache/jena/tags","blobs_url":"https://api.github.com/repos/apache/jena/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/jena/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/jena/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/jena/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/jena/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/jena/languages","stargazers_url":"https://api.github.com/repos/apache/jena/stargazers","contributors_url":"https://api.github.com/repos/apache/jena/contributors","subscribers_url":"https://api.github.com/repos/apache/jena/subscribers","subscription_url":"https://api.github.com/repos/apache/jena/subscription","commits_url":"https://api.github.com/repos/apache/jena/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/jena/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/jena/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/jena/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/jena/contents/{+path}","compare_url":"https://api.github.com/repos/apache/jena/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/jena/merges","archive_url":"https://api.github.com/repos/apache/jena/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/jena/downloads","issues_url":"https://api.github.com/repos/apache/jena/issues{/number}","pulls_url":"https://api.github.com/repos/apache/jena/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/jena/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/jena/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/jena/labels{/name}","releases_url":"https://api.github.com/repos/apache/jena/releases{/id}","created_at":"2013-01-04T08:00:32Z","updated_at":"2015-11-10T09:03:18Z","pushed_at":"2015-11-09T21:06:14Z","git_url":"git://github.com/apache/jena.git","ssh_url":"git@github.com:apache/jena.git","clone_url":"https://github.com/apache/jena.git","svn_url":"https://github.com/apache/jena","homepage":null,"size":460452,"stargazers_count":178,"watchers_count":178,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":140,"mirror_url":"git://git.apache.org/jena.git","open_issues_count":6,"forks":140,"open_issues":6,"watchers":178,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/jena/pulls/94"},"html":{"href":"https://github.com/apache/jena/pull/94"},"issue":{"href":"https://api.github.com/repos/apache/jena/issues/94"},"comments":{"href":"https://api.github.com/repos/apache/jena/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/jena/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/jena/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/jena/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/apache/jena/statuses/bea4652f373491424ce939a881737a7917ea7861"}}}}