{"action":"created","comment":{"url":"https://api.github.com/repos/Teradata/presto/pulls/comments/49972682","id":49972682,"diff_hunk":"@@ -0,0 +1,135 @@\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.spi.PrestoException;\n+import com.facebook.presto.spi.StandardErrorCode;\n+import com.facebook.presto.sql.analyzer.SemanticErrorCode;\n+import com.facebook.presto.sql.analyzer.SemanticException;\n+import com.facebook.presto.sql.planner.plan.ApplyNode;\n+import com.facebook.presto.sql.planner.plan.FilterNode;\n+import com.facebook.presto.sql.planner.plan.PlanNode;\n+import com.facebook.presto.sql.planner.plan.ProjectNode;\n+import com.facebook.presto.sql.planner.plan.TableScanNode;\n+import com.facebook.presto.sql.planner.plan.ValuesNode;\n+import com.facebook.presto.sql.tree.DefaultTraversalVisitor;\n+import com.facebook.presto.sql.tree.Expression;\n+import com.facebook.presto.sql.tree.SubqueryExpression;\n+import com.google.common.collect.ImmutableList;\n+\n+import javax.inject.Provider;","path":"presto-main/src/main/java/com/facebook/presto/sql/planner/PlanVerifiersFactory.java","position":31,"original_position":31,"commit_id":"9957384d8ba8bc67ef2c1c7c8aa6d5c84b98e8a5","original_commit_id":"9957384d8ba8bc67ef2c1c7c8aa6d5c84b98e8a5","user":{"login":"losipiuk","id":890111,"avatar_url":"https://avatars.githubusercontent.com/u/890111?v=3","gravatar_id":"","url":"https://api.github.com/users/losipiuk","html_url":"https://github.com/losipiuk","followers_url":"https://api.github.com/users/losipiuk/followers","following_url":"https://api.github.com/users/losipiuk/following{/other_user}","gists_url":"https://api.github.com/users/losipiuk/gists{/gist_id}","starred_url":"https://api.github.com/users/losipiuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losipiuk/subscriptions","organizations_url":"https://api.github.com/users/losipiuk/orgs","repos_url":"https://api.github.com/users/losipiuk/repos","events_url":"https://api.github.com/users/losipiuk/events{/privacy}","received_events_url":"https://api.github.com/users/losipiuk/received_events","type":"User","site_admin":false},"body":"karol wylacz smsy","created_at":"2016-01-18T08:49:12Z","updated_at":"2016-01-18T08:49:12Z","html_url":"https://github.com/Teradata/presto/pull/96#discussion_r49972682","pull_request_url":"https://api.github.com/repos/Teradata/presto/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/Teradata/presto/pulls/comments/49972682"},"html":{"href":"https://github.com/Teradata/presto/pull/96#discussion_r49972682"},"pull_request":{"href":"https://api.github.com/repos/Teradata/presto/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/Teradata/presto/pulls/96","id":56163759,"html_url":"https://github.com/Teradata/presto/pull/96","diff_url":"https://github.com/Teradata/presto/pull/96.diff","patch_url":"https://github.com/Teradata/presto/pull/96.patch","issue_url":"https://api.github.com/repos/Teradata/presto/issues/96","number":96,"state":"open","locked":false,"title":"Introduce Apply plan node","user":{"login":"kokosing","id":7569403,"avatar_url":"https://avatars.githubusercontent.com/u/7569403?v=3","gravatar_id":"","url":"https://api.github.com/users/kokosing","html_url":"https://github.com/kokosing","followers_url":"https://api.github.com/users/kokosing/followers","following_url":"https://api.github.com/users/kokosing/following{/other_user}","gists_url":"https://api.github.com/users/kokosing/gists{/gist_id}","starred_url":"https://api.github.com/users/kokosing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokosing/subscriptions","organizations_url":"https://api.github.com/users/kokosing/orgs","repos_url":"https://api.github.com/users/kokosing/repos","events_url":"https://api.github.com/users/kokosing/events{/privacy}","received_events_url":"https://api.github.com/users/kokosing/received_events","type":"User","site_admin":false},"body":"    Introduce Apply plan node\r\n    \r\n    It is a logical representation of a subquery.\r\n    Apply node contains input relation, expression relation and parameters\r\n    (symbol list).\r\n    \r\n    Each row in the input relation is passed to the expression, then\r\n    expression (subquery) is executed. Expression produces new columns which\r\n    are joined with the input row. Parameters (correlation list) determines\r\n    what columns need to be passed from the input to the expression to\r\n    calculate the result rows. If correlation list is empty then subquery\r\n    is not correlated, in this case values returned from expression are\r\n    always the same, not dependent on input relation.\r\n    \r\n    See\r\n    https://docs.google.com/document/d/18HN7peS2eR8lZsErqcmnoWyMEPb6p4OQeidH1JP_EkA/\r\n","created_at":"2016-01-15T12:29:57Z","updated_at":"2016-01-18T08:49:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c48a75fd43e0460dcbeb5db19cc425dfe4e3535","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Teradata/presto/pulls/96/commits","review_comments_url":"https://api.github.com/repos/Teradata/presto/pulls/96/comments","review_comment_url":"https://api.github.com/repos/Teradata/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Teradata/presto/issues/96/comments","statuses_url":"https://api.github.com/repos/Teradata/presto/statuses/9957384d8ba8bc67ef2c1c7c8aa6d5c84b98e8a5","head":{"label":"Teradata:feature_verify-no-subqueries-left","ref":"feature_verify-no-subqueries-left","sha":"9957384d8ba8bc67ef2c1c7c8aa6d5c84b98e8a5","user":{"login":"Teradata","id":1615979,"avatar_url":"https://avatars.githubusercontent.com/u/1615979?v=3","gravatar_id":"","url":"https://api.github.com/users/Teradata","html_url":"https://github.com/Teradata","followers_url":"https://api.github.com/users/Teradata/followers","following_url":"https://api.github.com/users/Teradata/following{/other_user}","gists_url":"https://api.github.com/users/Teradata/gists{/gist_id}","starred_url":"https://api.github.com/users/Teradata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teradata/subscriptions","organizations_url":"https://api.github.com/users/Teradata/orgs","repos_url":"https://api.github.com/users/Teradata/repos","events_url":"https://api.github.com/users/Teradata/events{/privacy}","received_events_url":"https://api.github.com/users/Teradata/received_events","type":"Organization","site_admin":false},"repo":{"id":36903368,"name":"presto","full_name":"Teradata/presto","owner":{"login":"Teradata","id":1615979,"avatar_url":"https://avatars.githubusercontent.com/u/1615979?v=3","gravatar_id":"","url":"https://api.github.com/users/Teradata","html_url":"https://github.com/Teradata","followers_url":"https://api.github.com/users/Teradata/followers","following_url":"https://api.github.com/users/Teradata/following{/other_user}","gists_url":"https://api.github.com/users/Teradata/gists{/gist_id}","starred_url":"https://api.github.com/users/Teradata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teradata/subscriptions","organizations_url":"https://api.github.com/users/Teradata/orgs","repos_url":"https://api.github.com/users/Teradata/repos","events_url":"https://api.github.com/users/Teradata/events{/privacy}","received_events_url":"https://api.github.com/users/Teradata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Teradata/presto","description":"Teradata's Certified Version of Presto -- A Distributed SQL Query Engine for Big Data","fork":true,"url":"https://api.github.com/repos/Teradata/presto","forks_url":"https://api.github.com/repos/Teradata/presto/forks","keys_url":"https://api.github.com/repos/Teradata/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Teradata/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Teradata/presto/teams","hooks_url":"https://api.github.com/repos/Teradata/presto/hooks","issue_events_url":"https://api.github.com/repos/Teradata/presto/issues/events{/number}","events_url":"https://api.github.com/repos/Teradata/presto/events","assignees_url":"https://api.github.com/repos/Teradata/presto/assignees{/user}","branches_url":"https://api.github.com/repos/Teradata/presto/branches{/branch}","tags_url":"https://api.github.com/repos/Teradata/presto/tags","blobs_url":"https://api.github.com/repos/Teradata/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Teradata/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Teradata/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/Teradata/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Teradata/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/Teradata/presto/languages","stargazers_url":"https://api.github.com/repos/Teradata/presto/stargazers","contributors_url":"https://api.github.com/repos/Teradata/presto/contributors","subscribers_url":"https://api.github.com/repos/Teradata/presto/subscribers","subscription_url":"https://api.github.com/repos/Teradata/presto/subscription","commits_url":"https://api.github.com/repos/Teradata/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/Teradata/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/Teradata/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/Teradata/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/Teradata/presto/contents/{+path}","compare_url":"https://api.github.com/repos/Teradata/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Teradata/presto/merges","archive_url":"https://api.github.com/repos/Teradata/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Teradata/presto/downloads","issues_url":"https://api.github.com/repos/Teradata/presto/issues{/number}","pulls_url":"https://api.github.com/repos/Teradata/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/Teradata/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/Teradata/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Teradata/presto/labels{/name}","releases_url":"https://api.github.com/repos/Teradata/presto/releases{/id}","created_at":"2015-06-05T00:38:37Z","updated_at":"2016-01-15T21:54:57Z","pushed_at":"2016-01-18T03:05:36Z","git_url":"git://github.com/Teradata/presto.git","ssh_url":"git@github.com:Teradata/presto.git","clone_url":"https://github.com/Teradata/presto.git","svn_url":"https://github.com/Teradata/presto","homepage":"http://www.teradata.com/presto","size":88526,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":30,"default_branch":"master"}},"base":{"label":"Teradata:master","ref":"master","sha":"c0e32e0e9a787708250f3c47f8f11567cbe679ae","user":{"login":"Teradata","id":1615979,"avatar_url":"https://avatars.githubusercontent.com/u/1615979?v=3","gravatar_id":"","url":"https://api.github.com/users/Teradata","html_url":"https://github.com/Teradata","followers_url":"https://api.github.com/users/Teradata/followers","following_url":"https://api.github.com/users/Teradata/following{/other_user}","gists_url":"https://api.github.com/users/Teradata/gists{/gist_id}","starred_url":"https://api.github.com/users/Teradata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teradata/subscriptions","organizations_url":"https://api.github.com/users/Teradata/orgs","repos_url":"https://api.github.com/users/Teradata/repos","events_url":"https://api.github.com/users/Teradata/events{/privacy}","received_events_url":"https://api.github.com/users/Teradata/received_events","type":"Organization","site_admin":false},"repo":{"id":36903368,"name":"presto","full_name":"Teradata/presto","owner":{"login":"Teradata","id":1615979,"avatar_url":"https://avatars.githubusercontent.com/u/1615979?v=3","gravatar_id":"","url":"https://api.github.com/users/Teradata","html_url":"https://github.com/Teradata","followers_url":"https://api.github.com/users/Teradata/followers","following_url":"https://api.github.com/users/Teradata/following{/other_user}","gists_url":"https://api.github.com/users/Teradata/gists{/gist_id}","starred_url":"https://api.github.com/users/Teradata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teradata/subscriptions","organizations_url":"https://api.github.com/users/Teradata/orgs","repos_url":"https://api.github.com/users/Teradata/repos","events_url":"https://api.github.com/users/Teradata/events{/privacy}","received_events_url":"https://api.github.com/users/Teradata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Teradata/presto","description":"Teradata's Certified Version of Presto -- A Distributed SQL Query Engine for Big Data","fork":true,"url":"https://api.github.com/repos/Teradata/presto","forks_url":"https://api.github.com/repos/Teradata/presto/forks","keys_url":"https://api.github.com/repos/Teradata/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Teradata/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Teradata/presto/teams","hooks_url":"https://api.github.com/repos/Teradata/presto/hooks","issue_events_url":"https://api.github.com/repos/Teradata/presto/issues/events{/number}","events_url":"https://api.github.com/repos/Teradata/presto/events","assignees_url":"https://api.github.com/repos/Teradata/presto/assignees{/user}","branches_url":"https://api.github.com/repos/Teradata/presto/branches{/branch}","tags_url":"https://api.github.com/repos/Teradata/presto/tags","blobs_url":"https://api.github.com/repos/Teradata/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Teradata/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Teradata/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/Teradata/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Teradata/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/Teradata/presto/languages","stargazers_url":"https://api.github.com/repos/Teradata/presto/stargazers","contributors_url":"https://api.github.com/repos/Teradata/presto/contributors","subscribers_url":"https://api.github.com/repos/Teradata/presto/subscribers","subscription_url":"https://api.github.com/repos/Teradata/presto/subscription","commits_url":"https://api.github.com/repos/Teradata/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/Teradata/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/Teradata/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/Teradata/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/Teradata/presto/contents/{+path}","compare_url":"https://api.github.com/repos/Teradata/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Teradata/presto/merges","archive_url":"https://api.github.com/repos/Teradata/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Teradata/presto/downloads","issues_url":"https://api.github.com/repos/Teradata/presto/issues{/number}","pulls_url":"https://api.github.com/repos/Teradata/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/Teradata/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/Teradata/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Teradata/presto/labels{/name}","releases_url":"https://api.github.com/repos/Teradata/presto/releases{/id}","created_at":"2015-06-05T00:38:37Z","updated_at":"2016-01-15T21:54:57Z","pushed_at":"2016-01-18T03:05:36Z","git_url":"git://github.com/Teradata/presto.git","ssh_url":"git@github.com:Teradata/presto.git","clone_url":"https://github.com/Teradata/presto.git","svn_url":"https://github.com/Teradata/presto","homepage":"http://www.teradata.com/presto","size":88526,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Teradata/presto/pulls/96"},"html":{"href":"https://github.com/Teradata/presto/pull/96"},"issue":{"href":"https://api.github.com/repos/Teradata/presto/issues/96"},"comments":{"href":"https://api.github.com/repos/Teradata/presto/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/Teradata/presto/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/Teradata/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Teradata/presto/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/Teradata/presto/statuses/9957384d8ba8bc67ef2c1c7c8aa6d5c84b98e8a5"}}}}