{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/93738436","pull_request_review_id":14271970,"id":93738436,"diff_hunk":"@@ -0,0 +1,265 @@\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.iterative;\n+\n+import com.facebook.presto.sql.planner.PlanNodeIdAllocator;\n+import com.facebook.presto.sql.planner.Symbol;\n+import com.facebook.presto.sql.planner.plan.PlanNode;\n+import com.facebook.presto.sql.planner.plan.PlanNodeId;\n+import com.google.common.collect.ImmutableList;\n+import org.testng.annotations.Test;\n+\n+import java.util.List;\n+\n+import static org.testng.Assert.assertEquals;\n+\n+public class TestMemo","path":"presto-main/src/test/java/com/facebook/presto/sql/planner/iterative/TestMemo.java","position":27,"original_position":27,"commit_id":"1d57f9df9e31d05fe25f4f707705eb1fba2efea1","original_commit_id":"1d57f9df9e31d05fe25f4f707705eb1fba2efea1","user":{"login":"martint","id":14387,"avatar_url":"https://avatars.githubusercontent.com/u/14387?v=3","gravatar_id":"","url":"https://api.github.com/users/martint","html_url":"https://github.com/martint","followers_url":"https://api.github.com/users/martint/followers","following_url":"https://api.github.com/users/martint/following{/other_user}","gists_url":"https://api.github.com/users/martint/gists{/gist_id}","starred_url":"https://api.github.com/users/martint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martint/subscriptions","organizations_url":"https://api.github.com/users/martint/orgs","repos_url":"https://api.github.com/users/martint/repos","events_url":"https://api.github.com/users/martint/events{/privacy}","received_events_url":"https://api.github.com/users/martint/received_events","type":"User","site_admin":false},"body":"I'm not sure how a rule would be able to cause a cycle. Unless rules are making up group ids out of thin air, I don't think it's possible to do so. Let me think about it.","created_at":"2016-12-23T08:07:05Z","updated_at":"2016-12-23T08:07:05Z","html_url":"https://github.com/prestodb/presto/pull/6956#discussion_r93738436","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/6956","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/93738436"},"html":{"href":"https://github.com/prestodb/presto/pull/6956#discussion_r93738436"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6956"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/6956","id":99196381,"html_url":"https://github.com/prestodb/presto/pull/6956","diff_url":"https://github.com/prestodb/presto/pull/6956.diff","patch_url":"https://github.com/prestodb/presto/pull/6956.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/6956","number":6956,"state":"open","locked":false,"title":"Iterative optimizer","user":{"login":"martint","id":14387,"avatar_url":"https://avatars.githubusercontent.com/u/14387?v=3","gravatar_id":"","url":"https://api.github.com/users/martint","html_url":"https://github.com/martint","followers_url":"https://api.github.com/users/martint/followers","following_url":"https://api.github.com/users/martint/following{/other_user}","gists_url":"https://api.github.com/users/martint/gists{/gist_id}","starred_url":"https://api.github.com/users/martint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martint/subscriptions","organizations_url":"https://api.github.com/users/martint/orgs","repos_url":"https://api.github.com/users/martint/repos","events_url":"https://api.github.com/users/martint/events{/privacy}","received_events_url":"https://api.github.com/users/martint/received_events","type":"User","site_admin":false},"body":"This optimizer decouples the traversal of the plan tree (IterativeOptimizer)\r\nfrom the transformation logic (Rule). The optimization loop applies rules\r\nrecursively until a fixpoint is reached.\r\n\r\nIt's implemented as PlanOptimizer so that it fits right into the existing\r\nframework.\r\n\r\nExtracted from https://github.com/prestodb/presto/pull/6700","created_at":"2016-12-23T02:20:59Z","updated_at":"2016-12-23T08:07:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b978457763ed6b7c6730f88ce6d981c04ad565a6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/6956/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/6956/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/6956/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/1d57f9df9e31d05fe25f4f707705eb1fba2efea1","head":{"label":"martint:iterative","ref":"iterative","sha":"1d57f9df9e31d05fe25f4f707705eb1fba2efea1","user":{"login":"martint","id":14387,"avatar_url":"https://avatars.githubusercontent.com/u/14387?v=3","gravatar_id":"","url":"https://api.github.com/users/martint","html_url":"https://github.com/martint","followers_url":"https://api.github.com/users/martint/followers","following_url":"https://api.github.com/users/martint/following{/other_user}","gists_url":"https://api.github.com/users/martint/gists{/gist_id}","starred_url":"https://api.github.com/users/martint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martint/subscriptions","organizations_url":"https://api.github.com/users/martint/orgs","repos_url":"https://api.github.com/users/martint/repos","events_url":"https://api.github.com/users/martint/events{/privacy}","received_events_url":"https://api.github.com/users/martint/received_events","type":"User","site_admin":false},"repo":{"id":5498382,"name":"presto","full_name":"martint/presto","owner":{"login":"martint","id":14387,"avatar_url":"https://avatars.githubusercontent.com/u/14387?v=3","gravatar_id":"","url":"https://api.github.com/users/martint","html_url":"https://github.com/martint","followers_url":"https://api.github.com/users/martint/followers","following_url":"https://api.github.com/users/martint/following{/other_user}","gists_url":"https://api.github.com/users/martint/gists{/gist_id}","starred_url":"https://api.github.com/users/martint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martint/subscriptions","organizations_url":"https://api.github.com/users/martint/orgs","repos_url":"https://api.github.com/users/martint/repos","events_url":"https://api.github.com/users/martint/events{/privacy}","received_events_url":"https://api.github.com/users/martint/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martint/presto","description":null,"fork":true,"url":"https://api.github.com/repos/martint/presto","forks_url":"https://api.github.com/repos/martint/presto/forks","keys_url":"https://api.github.com/repos/martint/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martint/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martint/presto/teams","hooks_url":"https://api.github.com/repos/martint/presto/hooks","issue_events_url":"https://api.github.com/repos/martint/presto/issues/events{/number}","events_url":"https://api.github.com/repos/martint/presto/events","assignees_url":"https://api.github.com/repos/martint/presto/assignees{/user}","branches_url":"https://api.github.com/repos/martint/presto/branches{/branch}","tags_url":"https://api.github.com/repos/martint/presto/tags","blobs_url":"https://api.github.com/repos/martint/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martint/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martint/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/martint/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martint/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/martint/presto/languages","stargazers_url":"https://api.github.com/repos/martint/presto/stargazers","contributors_url":"https://api.github.com/repos/martint/presto/contributors","subscribers_url":"https://api.github.com/repos/martint/presto/subscribers","subscription_url":"https://api.github.com/repos/martint/presto/subscription","commits_url":"https://api.github.com/repos/martint/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/martint/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/martint/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/martint/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/martint/presto/contents/{+path}","compare_url":"https://api.github.com/repos/martint/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martint/presto/merges","archive_url":"https://api.github.com/repos/martint/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martint/presto/downloads","issues_url":"https://api.github.com/repos/martint/presto/issues{/number}","pulls_url":"https://api.github.com/repos/martint/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/martint/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/martint/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martint/presto/labels{/name}","releases_url":"https://api.github.com/repos/martint/presto/releases{/id}","deployments_url":"https://api.github.com/repos/martint/presto/deployments","created_at":"2012-08-21T17:22:50Z","updated_at":"2016-03-18T00:24:35Z","pushed_at":"2016-12-23T04:57:23Z","git_url":"git://github.com/martint/presto.git","ssh_url":"git@github.com:martint/presto.git","clone_url":"https://github.com/martint/presto.git","svn_url":"https://github.com/martint/presto","homepage":null,"size":65366,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"cbaf7c7413457cdfdb45ca20026ebfc17505ddf6","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","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://avatars.githubusercontent.com/u/6882181?v=3","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":"2016-12-22T21:23:56Z","pushed_at":"2016-12-23T06:50:06Z","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":64191,"stargazers_count":5437,"watchers_count":5437,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1717,"mirror_url":null,"open_issues_count":818,"forks":1717,"open_issues":818,"watchers":5437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6956"},"html":{"href":"https://github.com/prestodb/presto/pull/6956"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/6956"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/6956/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6956/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6956/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/1d57f9df9e31d05fe25f4f707705eb1fba2efea1"}}}}
{"actor":{"display_login":"martint"}}