{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/169766906","pull_request_review_id":98347451,"id":169766906,"diff_hunk":"@@ -437,6 +437,16 @@ public LookupSourceSupplier createLookupSourceSupplier(\n         return createLookupSourceSupplier(session, joinChannels, hashChannel, filterFunctionFactory, sortChannel, searchFunctionFactories, Optional.empty());\n     }\n \n+    public PagesSpatialIndex createPagesSpatialIndex(\n+            Session session,\n+            int geometryChannel,\n+            Optional<JoinFilterFunctionFactory> filterFunctionFactory,\n+            List<Integer> outputChannels)\n+    {\n+        List<List<Block>> channels = ImmutableList.copyOf(this.channels);","path":"presto-main/src/main/java/com/facebook/presto/operator/PagesIndex.java","position":null,"original_position":10,"commit_id":"b8e489190c7e071bb1b8b1054c0e7df5d7906b2a","original_commit_id":"c9ee5c132532ae99100c301e7f8ebb07804cf1eb","user":{"login":"findepi","id":144328,"avatar_url":"https://avatars0.githubusercontent.com/u/144328?v=4","gravatar_id":"","url":"https://api.github.com/users/findepi","html_url":"https://github.com/findepi","followers_url":"https://api.github.com/users/findepi/followers","following_url":"https://api.github.com/users/findepi/following{/other_user}","gists_url":"https://api.github.com/users/findepi/gists{/gist_id}","starred_url":"https://api.github.com/users/findepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/findepi/subscriptions","organizations_url":"https://api.github.com/users/findepi/orgs","repos_url":"https://api.github.com/users/findepi/repos","events_url":"https://api.github.com/users/findepi/events{/privacy}","received_events_url":"https://api.github.com/users/findepi/received_events","type":"User","site_admin":false},"body":"Interesting. I don't know why `PagesIndex#createLookupSourceSupplier` copies `channels`.. Maybe it's a (seemingly failed) attempt to make created `LookupSourceSupplier` independent from `PagesIndex`. Failed, because `valueAddresses` are passed as-is.\r\n\r\nI think not copying  is good from memory _accounting_ stand-point. Once you created the spatial index, you ask it how much memory it uses. If you don't share objects with `PagesIndex`, you need to add memory used by `PagesIndex` too... if you share only portion of state with `PagesIndex`, then things get more complicated.","created_at":"2018-02-21T20:25:10Z","updated_at":"2018-02-21T20:25:10Z","html_url":"https://github.com/prestodb/presto/pull/9474#discussion_r169766906","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/9474","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/169766906"},"html":{"href":"https://github.com/prestodb/presto/pull/9474#discussion_r169766906"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/9474"}},"in_reply_to_id":169038941},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/9474","id":156341016,"html_url":"https://github.com/prestodb/presto/pull/9474","diff_url":"https://github.com/prestodb/presto/pull/9474.diff","patch_url":"https://github.com/prestodb/presto/pull/9474.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/9474","number":9474,"state":"open","locked":false,"title":"Broadcast spatial join","user":{"login":"mbasmanova","id":27965151,"avatar_url":"https://avatars3.githubusercontent.com/u/27965151?v=4","gravatar_id":"","url":"https://api.github.com/users/mbasmanova","html_url":"https://github.com/mbasmanova","followers_url":"https://api.github.com/users/mbasmanova/followers","following_url":"https://api.github.com/users/mbasmanova/following{/other_user}","gists_url":"https://api.github.com/users/mbasmanova/gists{/gist_id}","starred_url":"https://api.github.com/users/mbasmanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbasmanova/subscriptions","organizations_url":"https://api.github.com/users/mbasmanova/orgs","repos_url":"https://api.github.com/users/mbasmanova/repos","events_url":"https://api.github.com/users/mbasmanova/events{/privacy}","received_events_url":"https://api.github.com/users/mbasmanova/received_events","type":"User","site_admin":false},"body":"Implements broadcast spatial join using an R-Tree as described in #9890.\r\n\r\nSupports spatial joins defined using ST_Contains and ST_Intersects functions.\r\n\r\nThe implementation consists of an optimizer rule and two custom operators. The new rule replaces a cross join node with a spatial filter on top into a spatial join node which is executed using new operators. SpatialIndexBuilderOperator builds an R-Tree from build side geometries. SpatialLookupJoinOperator processes probe geometries one record at a time looking up matching geometries in the R-Tree.\r\n","created_at":"2017-12-05T00:15:48Z","updated_at":"2018-02-21T20:25:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb46b47c309d3950fc6e0bc3b07de0ede8e74f7a","assignee":{"login":"dain","id":58298,"avatar_url":"https://avatars0.githubusercontent.com/u/58298?v=4","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"assignees":[{"login":"dain","id":58298,"avatar_url":"https://avatars0.githubusercontent.com/u/58298?v=4","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"sopel39","id":5989165,"avatar_url":"https://avatars1.githubusercontent.com/u/5989165?v=4","gravatar_id":"","url":"https://api.github.com/users/sopel39","html_url":"https://github.com/sopel39","followers_url":"https://api.github.com/users/sopel39/followers","following_url":"https://api.github.com/users/sopel39/following{/other_user}","gists_url":"https://api.github.com/users/sopel39/gists{/gist_id}","starred_url":"https://api.github.com/users/sopel39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sopel39/subscriptions","organizations_url":"https://api.github.com/users/sopel39/orgs","repos_url":"https://api.github.com/users/sopel39/repos","events_url":"https://api.github.com/users/sopel39/events{/privacy}","received_events_url":"https://api.github.com/users/sopel39/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":196992743,"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/9474/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/9474/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/9474/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/b8e489190c7e071bb1b8b1054c0e7df5d7906b2a","head":{"label":"mbasmanova:spatial-broadcast-join","ref":"spatial-broadcast-join","sha":"b8e489190c7e071bb1b8b1054c0e7df5d7906b2a","user":{"login":"mbasmanova","id":27965151,"avatar_url":"https://avatars3.githubusercontent.com/u/27965151?v=4","gravatar_id":"","url":"https://api.github.com/users/mbasmanova","html_url":"https://github.com/mbasmanova","followers_url":"https://api.github.com/users/mbasmanova/followers","following_url":"https://api.github.com/users/mbasmanova/following{/other_user}","gists_url":"https://api.github.com/users/mbasmanova/gists{/gist_id}","starred_url":"https://api.github.com/users/mbasmanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbasmanova/subscriptions","organizations_url":"https://api.github.com/users/mbasmanova/orgs","repos_url":"https://api.github.com/users/mbasmanova/repos","events_url":"https://api.github.com/users/mbasmanova/events{/privacy}","received_events_url":"https://api.github.com/users/mbasmanova/received_events","type":"User","site_admin":false},"repo":{"id":100315926,"name":"presto","full_name":"mbasmanova/presto","owner":{"login":"mbasmanova","id":27965151,"avatar_url":"https://avatars3.githubusercontent.com/u/27965151?v=4","gravatar_id":"","url":"https://api.github.com/users/mbasmanova","html_url":"https://github.com/mbasmanova","followers_url":"https://api.github.com/users/mbasmanova/followers","following_url":"https://api.github.com/users/mbasmanova/following{/other_user}","gists_url":"https://api.github.com/users/mbasmanova/gists{/gist_id}","starred_url":"https://api.github.com/users/mbasmanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbasmanova/subscriptions","organizations_url":"https://api.github.com/users/mbasmanova/orgs","repos_url":"https://api.github.com/users/mbasmanova/repos","events_url":"https://api.github.com/users/mbasmanova/events{/privacy}","received_events_url":"https://api.github.com/users/mbasmanova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbasmanova/presto","description":"Distributed SQL query engine for big data","fork":true,"url":"https://api.github.com/repos/mbasmanova/presto","forks_url":"https://api.github.com/repos/mbasmanova/presto/forks","keys_url":"https://api.github.com/repos/mbasmanova/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbasmanova/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbasmanova/presto/teams","hooks_url":"https://api.github.com/repos/mbasmanova/presto/hooks","issue_events_url":"https://api.github.com/repos/mbasmanova/presto/issues/events{/number}","events_url":"https://api.github.com/repos/mbasmanova/presto/events","assignees_url":"https://api.github.com/repos/mbasmanova/presto/assignees{/user}","branches_url":"https://api.github.com/repos/mbasmanova/presto/branches{/branch}","tags_url":"https://api.github.com/repos/mbasmanova/presto/tags","blobs_url":"https://api.github.com/repos/mbasmanova/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbasmanova/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbasmanova/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbasmanova/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbasmanova/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/mbasmanova/presto/languages","stargazers_url":"https://api.github.com/repos/mbasmanova/presto/stargazers","contributors_url":"https://api.github.com/repos/mbasmanova/presto/contributors","subscribers_url":"https://api.github.com/repos/mbasmanova/presto/subscribers","subscription_url":"https://api.github.com/repos/mbasmanova/presto/subscription","commits_url":"https://api.github.com/repos/mbasmanova/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbasmanova/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbasmanova/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbasmanova/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbasmanova/presto/contents/{+path}","compare_url":"https://api.github.com/repos/mbasmanova/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbasmanova/presto/merges","archive_url":"https://api.github.com/repos/mbasmanova/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbasmanova/presto/downloads","issues_url":"https://api.github.com/repos/mbasmanova/presto/issues{/number}","pulls_url":"https://api.github.com/repos/mbasmanova/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/mbasmanova/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/mbasmanova/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbasmanova/presto/labels{/name}","releases_url":"https://api.github.com/repos/mbasmanova/presto/releases{/id}","deployments_url":"https://api.github.com/repos/mbasmanova/presto/deployments","created_at":"2017-08-14T22:58:12Z","updated_at":"2017-08-14T22:58:31Z","pushed_at":"2018-02-21T19:55:59Z","git_url":"git://github.com/mbasmanova/presto.git","ssh_url":"git@github.com:mbasmanova/presto.git","clone_url":"https://github.com/mbasmanova/presto.git","svn_url":"https://github.com/mbasmanova/presto","homepage":"https://prestodb.io","size":87448,"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,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"0da1b56aff516ba4ce16578951ec0c574e44f013","user":{"login":"prestodb","id":6882181,"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,"name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"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},"private":false,"html_url":"https://github.com/prestodb/presto","description":"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":"2018-02-21T16:39:27Z","pushed_at":"2018-02-21T19:55:49Z","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":"https://prestodb.io","size":87648,"stargazers_count":7122,"watchers_count":7122,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2380,"mirror_url":null,"archived":false,"open_issues_count":1190,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2380,"open_issues":1190,"watchers":7122,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/9474"},"html":{"href":"https://github.com/prestodb/presto/pull/9474"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/9474"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/9474/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/9474/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/9474/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/b8e489190c7e071bb1b8b1054c0e7df5d7906b2a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"findepi"}}