payload: {"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/273240978","pull_request_review_id":224089878,"id":273240978,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3MzI0MDk3OA==","diff_hunk":"@@ -0,0 +1,94 @@\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+package com.facebook.presto.sql.planner;\n+\n+import com.facebook.presto.connector.ConnectorId;\n+import com.facebook.presto.execution.Lifespan;\n+import com.facebook.presto.spi.connector.ConnectorPartitionHandle;\n+import com.facebook.presto.spi.connector.ConnectorTransactionHandle;\n+import com.facebook.presto.split.SplitSource;\n+import com.google.common.util.concurrent.ListenableFuture;\n+\n+import javax.annotation.concurrent.GuardedBy;\n+\n+import java.util.function.Supplier;\n+\n+import static com.google.common.base.Preconditions.checkState;\n+import static java.util.Objects.requireNonNull;\n+\n+public class LazySplitSource\n+        implements SplitSource\n+{\n+    private final Supplier<SplitSource> supplier;\n+\n+    @GuardedBy(\"this\")\n+    private SplitSource instance;\n+    @GuardedBy(\"this\")\n+    private boolean closed;\n+\n+    public LazySplitSource(Supplier<SplitSource> supplier)\n+    {\n+        this.supplier = requireNonNull(supplier, \"supplier is null\");\n+    }\n+\n+    @Override\n+    public ConnectorId getConnectorId()\n+    {\n+        return getDelegate().getConnectorId();\n+    }\n+\n+    @Override\n+    public ConnectorTransactionHandle getTransactionHandle()\n+    {\n+        return getDelegate().getTransactionHandle();\n+    }\n+\n+    @Override\n+    public ListenableFuture<SplitBatch> getNextBatch(ConnectorPartitionHandle partitionHandle, Lifespan lifespan, int maxSize)\n+    {\n+        return getDelegate().getNextBatch(partitionHandle, lifespan, maxSize);\n+    }\n+\n+    @Override\n+    public boolean isFinished()\n+    {\n+        return getDelegate().isFinished();\n+    }\n+\n+    @Override\n+    public synchronized void close()\n+    {\n+        // not yet initialized\n+        if (instance == null) {","path":"presto-main/src/main/java/com/facebook/presto/sql/planner/LazySplitSource.java","position":73,"original_position":73,"commit_id":"db9f21ce400bdee3a33770793a1a2ea6dfa2324f","original_commit_id":"4bd8aa96cf83b5d713e8d5972bb491e14dd4d688","user":{"login":"arhimondr","id":5570988,"node_id":"MDQ6VXNlcjU1NzA5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5570988?v=4","gravatar_id":"","url":"https://api.github.com/users/arhimondr","html_url":"https://github.com/arhimondr","followers_url":"https://api.github.com/users/arhimondr/followers","following_url":"https://api.github.com/users/arhimondr/following{/other_user}","gists_url":"https://api.github.com/users/arhimondr/gists{/gist_id}","starred_url":"https://api.github.com/users/arhimondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhimondr/subscriptions","organizations_url":"https://api.github.com/users/arhimondr/orgs","repos_url":"https://api.github.com/users/arhimondr/repos","events_url":"https://api.github.com/users/arhimondr/events{/privacy}","received_events_url":"https://api.github.com/users/arhimondr/received_events","type":"User","site_admin":false},"body":"Yeah, in theory.","created_at":"2019-04-08T21:12:27Z","updated_at":"2019-04-08T21:12:28Z","html_url":"https://github.com/prestodb/presto/pull/12469#discussion_r273240978","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/12469","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/273240978"},"html":{"href":"https://github.com/prestodb/presto/pull/12469#discussion_r273240978"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/12469"}},"in_reply_to_id":267616786},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/12469","id":260993123,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYwOTkzMTIz","html_url":"https://github.com/prestodb/presto/pull/12469","diff_url":"https://github.com/prestodb/presto/pull/12469.diff","patch_url":"https://github.com/prestodb/presto/pull/12469.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/12469","number":12469,"state":"open","locked":false,"title":"Support materializing exchanges","user":{"login":"arhimondr","id":5570988,"node_id":"MDQ6VXNlcjU1NzA5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5570988?v=4","gravatar_id":"","url":"https://api.github.com/users/arhimondr","html_url":"https://github.com/arhimondr","followers_url":"https://api.github.com/users/arhimondr/followers","following_url":"https://api.github.com/users/arhimondr/following{/other_user}","gists_url":"https://api.github.com/users/arhimondr/gists{/gist_id}","starred_url":"https://api.github.com/users/arhimondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhimondr/subscriptions","organizations_url":"https://api.github.com/users/arhimondr/orgs","repos_url":"https://api.github.com/users/arhimondr/repos","events_url":"https://api.github.com/users/arhimondr/events{/privacy}","received_events_url":"https://api.github.com/users/arhimondr/received_events","type":"User","site_admin":false},"body":"Attempt to #12387.\r\n\r\nDepends on #12464. Don't review the first commit.","created_at":"2019-03-14T01:18:38Z","updated_at":"2019-04-08T21:12:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1633c90ea44098cf4410e16dcbc2fe95a92fa59a","assignee":{"login":"arhimondr","id":5570988,"node_id":"MDQ6VXNlcjU1NzA5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5570988?v=4","gravatar_id":"","url":"https://api.github.com/users/arhimondr","html_url":"https://github.com/arhimondr","followers_url":"https://api.github.com/users/arhimondr/followers","following_url":"https://api.github.com/users/arhimondr/following{/other_user}","gists_url":"https://api.github.com/users/arhimondr/gists{/gist_id}","starred_url":"https://api.github.com/users/arhimondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhimondr/subscriptions","organizations_url":"https://api.github.com/users/arhimondr/orgs","repos_url":"https://api.github.com/users/arhimondr/repos","events_url":"https://api.github.com/users/arhimondr/events{/privacy}","received_events_url":"https://api.github.com/users/arhimondr/received_events","type":"User","site_admin":false},"assignees":[{"login":"arhimondr","id":5570988,"node_id":"MDQ6VXNlcjU1NzA5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5570988?v=4","gravatar_id":"","url":"https://api.github.com/users/arhimondr","html_url":"https://github.com/arhimondr","followers_url":"https://api.github.com/users/arhimondr/followers","following_url":"https://api.github.com/users/arhimondr/following{/other_user}","gists_url":"https://api.github.com/users/arhimondr/gists{/gist_id}","starred_url":"https://api.github.com/users/arhimondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhimondr/subscriptions","organizations_url":"https://api.github.com/users/arhimondr/orgs","repos_url":"https://api.github.com/users/arhimondr/repos","events_url":"https://api.github.com/users/arhimondr/events{/privacy}","received_events_url":"https://api.github.com/users/arhimondr/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"shixuan-fan","id":12627919,"node_id":"MDQ6VXNlcjEyNjI3OTE5","avatar_url":"https://avatars1.githubusercontent.com/u/12627919?v=4","gravatar_id":"","url":"https://api.github.com/users/shixuan-fan","html_url":"https://github.com/shixuan-fan","followers_url":"https://api.github.com/users/shixuan-fan/followers","following_url":"https://api.github.com/users/shixuan-fan/following{/other_user}","gists_url":"https://api.github.com/users/shixuan-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/shixuan-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shixuan-fan/subscriptions","organizations_url":"https://api.github.com/users/shixuan-fan/orgs","repos_url":"https://api.github.com/users/shixuan-fan/repos","events_url":"https://api.github.com/users/shixuan-fan/events{/privacy}","received_events_url":"https://api.github.com/users/shixuan-fan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":196992743,"node_id":"MDU6TGFiZWwxOTY5OTI3NDM=","url":"https://api.github.com/repos/prestodb/presto/labels/CLA%20Signed","name":"CLA Signed","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/12469/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/12469/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/12469/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/db9f21ce400bdee3a33770793a1a2ea6dfa2324f","head":{"label":"arhimondr:materializing-exchanges-v2","ref":"materializing-exchanges-v2","sha":"db9f21ce400bdee3a33770793a1a2ea6dfa2324f","user":{"login":"arhimondr","id":5570988,"node_id":"MDQ6VXNlcjU1NzA5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5570988?v=4","gravatar_id":"","url":"https://api.github.com/users/arhimondr","html_url":"https://github.com/arhimondr","followers_url":"https://api.github.com/users/arhimondr/followers","following_url":"https://api.github.com/users/arhimondr/following{/other_user}","gists_url":"https://api.github.com/users/arhimondr/gists{/gist_id}","starred_url":"https://api.github.com/users/arhimondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhimondr/subscriptions","organizations_url":"https://api.github.com/users/arhimondr/orgs","repos_url":"https://api.github.com/users/arhimondr/repos","events_url":"https://api.github.com/users/arhimondr/events{/privacy}","received_events_url":"https://api.github.com/users/arhimondr/received_events","type":"User","site_admin":false},"repo":{"id":37681604,"node_id":"MDEwOlJlcG9zaXRvcnkzNzY4MTYwNA==","name":"presto","full_name":"arhimondr/presto","private":false,"owner":{"login":"arhimondr","id":5570988,"node_id":"MDQ6VXNlcjU1NzA5ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5570988?v=4","gravatar_id":"","url":"https://api.github.com/users/arhimondr","html_url":"https://github.com/arhimondr","followers_url":"https://api.github.com/users/arhimondr/followers","following_url":"https://api.github.com/users/arhimondr/following{/other_user}","gists_url":"https://api.github.com/users/arhimondr/gists{/gist_id}","starred_url":"https://api.github.com/users/arhimondr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhimondr/subscriptions","organizations_url":"https://api.github.com/users/arhimondr/orgs","repos_url":"https://api.github.com/users/arhimondr/repos","events_url":"https://api.github.com/users/arhimondr/events{/privacy}","received_events_url":"https://api.github.com/users/arhimondr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/arhimondr/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":true,"url":"https://api.github.com/repos/arhimondr/presto","forks_url":"https://api.github.com/repos/arhimondr/presto/forks","keys_url":"https://api.github.com/repos/arhimondr/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arhimondr/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arhimondr/presto/teams","hooks_url":"https://api.github.com/repos/arhimondr/presto/hooks","issue_events_url":"https://api.github.com/repos/arhimondr/presto/issues/events{/number}","events_url":"https://api.github.com/repos/arhimondr/presto/events","assignees_url":"https://api.github.com/repos/arhimondr/presto/assignees{/user}","branches_url":"https://api.github.com/repos/arhimondr/presto/branches{/branch}","tags_url":"https://api.github.com/repos/arhimondr/presto/tags","blobs_url":"https://api.github.com/repos/arhimondr/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arhimondr/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arhimondr/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/arhimondr/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arhimondr/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/arhimondr/presto/languages","stargazers_url":"https://api.github.com/repos/arhimondr/presto/stargazers","contributors_url":"https://api.github.com/repos/arhimondr/presto/contributors","subscribers_url":"https://api.github.com/repos/arhimondr/presto/subscribers","subscription_url":"https://api.github.com/repos/arhimondr/presto/subscription","commits_url":"https://api.github.com/repos/arhimondr/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/arhimondr/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/arhimondr/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/arhimondr/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/arhimondr/presto/contents/{+path}","compare_url":"https://api.github.com/repos/arhimondr/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arhimondr/presto/merges","archive_url":"https://api.github.com/repos/arhimondr/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arhimondr/presto/downloads","issues_url":"https://api.github.com/repos/arhimondr/presto/issues{/number}","pulls_url":"https://api.github.com/repos/arhimondr/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/arhimondr/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/arhimondr/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arhimondr/presto/labels{/name}","releases_url":"https://api.github.com/repos/arhimondr/presto/releases{/id}","deployments_url":"https://api.github.com/repos/arhimondr/presto/deployments","created_at":"2015-06-18T19:57:44Z","updated_at":"2018-12-20T17:11:07Z","pushed_at":"2019-04-08T19:29:35Z","git_url":"git://github.com/arhimondr/presto.git","ssh_url":"git@github.com:arhimondr/presto.git","clone_url":"https://github.com/arhimondr/presto.git","svn_url":"https://github.com/arhimondr/presto","homepage":"https://prestodb.io","size":108289,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"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":1,"watchers":0,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"92cfb1cedfb4f48dc6c3950d184e6ed485dd770d","user":{"login":"prestodb","id":6882181,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4ODIxODE=","avatar_url":"https://avatars0.githubusercontent.com/u/6882181?v=4","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"node_id":"MDEwOlJlcG9zaXRvcnk1MzQ5NTY1","name":"presto","full_name":"prestodb/presto","private":false,"owner":{"login":"prestodb","id":6882181,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4ODIxODE=","avatar_url":"https://avatars0.githubusercontent.com/u/6882181?v=4","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/prestodb/presto","description":"The official home of the Presto distributed SQL query engine for big data","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2019-04-08T19:30:33Z","pushed_at":"2019-04-08T21:04:21Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"http://prestodb.github.io","size":109139,"stargazers_count":8911,"watchers_count":8911,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3031,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1441,"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":3031,"open_issues":1441,"watchers":8911,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/12469"},"html":{"href":"https://github.com/prestodb/presto/pull/12469"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/12469"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/12469/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/12469/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/12469/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/db9f21ce400bdee3a33770793a1a2ea6dfa2324f"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"arhimondr"}}