{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/204048624","pull_request_review_id":139061799,"id":204048624,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDA0ODYyNA==","diff_hunk":"@@ -352,7 +352,15 @@ public PlanNode visitSample(SampleNode node, RewriteContext<Void> context)\n         @Override\n         public PlanNode visitValues(ValuesNode node, RewriteContext<Void> context)\n         {\n-            return context.defaultRewrite(node);\n+            List<List<Expression>> canonicalizedRows = node.getRows().stream()\n+                    .map(this::canonicalize)\n+                    .collect(toImmutableList());\n+            List<Symbol> canonicalizedOutputSymbols = canonicalizeAndDistinct(node.getOutputSymbols());\n+            checkState(node.getOutputSymbols().size() == canonicalizedOutputSymbols.size(), \"Values output symbols were pruned\");","path":"presto-main/src/main/java/com/facebook/presto/sql/planner/optimizations/UnaliasSymbolReferences.java","position":9,"original_position":9,"commit_id":"d359285fe88b25e84ab7df5cf3cb6b2a26b45f25","original_commit_id":"d359285fe88b25e84ab7df5cf3cb6b2a26b45f25","user":{"login":"sopel39","id":5989165,"node_id":"MDQ6VXNlcjU5ODkxNjU=","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},"body":"just use `canonicalize` (if it exists) instead of `canonicalizeAndDistinct`","created_at":"2018-07-20T13:44:13Z","updated_at":"2018-07-20T13:52:10Z","html_url":"https://github.com/prestodb/presto/pull/11092#discussion_r204048624","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/11092","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/204048624"},"html":{"href":"https://github.com/prestodb/presto/pull/11092#discussion_r204048624"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/11092"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/11092","id":202799964,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNzk5OTY0","html_url":"https://github.com/prestodb/presto/pull/11092","diff_url":"https://github.com/prestodb/presto/pull/11092.diff","patch_url":"https://github.com/prestodb/presto/pull/11092.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/11092","number":11092,"state":"open","locked":false,"title":"Canonicalize ValuesNode as it may contain correlated symbols","user":{"login":"kokosing","id":7569403,"node_id":"MDQ6VXNlcjc1Njk0MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7569403?v=4","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":"Canonicalize ValuesNode as it may contain correlated symbols\n\nFixes #11047\n","created_at":"2018-07-20T09:51:24Z","updated_at":"2018-07-20T13:52:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24365a0d61d8c440c27947f3e31344e49c3b7a80","assignee":null,"assignees":[],"requested_reviewers":[{"login":"martint","id":14387,"node_id":"MDQ6VXNlcjE0Mzg3","avatar_url":"https://avatars3.githubusercontent.com/u/14387?v=4","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}],"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/11092/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/11092/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/11092/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/d359285fe88b25e84ab7df5cf3cb6b2a26b45f25","head":{"label":"kokosing:origin/master/003_fix_lateral","ref":"origin/master/003_fix_lateral","sha":"d359285fe88b25e84ab7df5cf3cb6b2a26b45f25","user":{"login":"kokosing","id":7569403,"node_id":"MDQ6VXNlcjc1Njk0MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7569403?v=4","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},"repo":{"id":55942614,"node_id":"MDEwOlJlcG9zaXRvcnk1NTk0MjYxNA==","name":"presto","full_name":"kokosing/presto","owner":{"login":"kokosing","id":7569403,"node_id":"MDQ6VXNlcjc1Njk0MDM=","avatar_url":"https://avatars2.githubusercontent.com/u/7569403?v=4","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},"private":false,"html_url":"https://github.com/kokosing/presto","description":"Distributed SQL query engine for big data","fork":true,"url":"https://api.github.com/repos/kokosing/presto","forks_url":"https://api.github.com/repos/kokosing/presto/forks","keys_url":"https://api.github.com/repos/kokosing/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kokosing/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kokosing/presto/teams","hooks_url":"https://api.github.com/repos/kokosing/presto/hooks","issue_events_url":"https://api.github.com/repos/kokosing/presto/issues/events{/number}","events_url":"https://api.github.com/repos/kokosing/presto/events","assignees_url":"https://api.github.com/repos/kokosing/presto/assignees{/user}","branches_url":"https://api.github.com/repos/kokosing/presto/branches{/branch}","tags_url":"https://api.github.com/repos/kokosing/presto/tags","blobs_url":"https://api.github.com/repos/kokosing/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kokosing/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kokosing/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/kokosing/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kokosing/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/kokosing/presto/languages","stargazers_url":"https://api.github.com/repos/kokosing/presto/stargazers","contributors_url":"https://api.github.com/repos/kokosing/presto/contributors","subscribers_url":"https://api.github.com/repos/kokosing/presto/subscribers","subscription_url":"https://api.github.com/repos/kokosing/presto/subscription","commits_url":"https://api.github.com/repos/kokosing/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/kokosing/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/kokosing/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/kokosing/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/kokosing/presto/contents/{+path}","compare_url":"https://api.github.com/repos/kokosing/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kokosing/presto/merges","archive_url":"https://api.github.com/repos/kokosing/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kokosing/presto/downloads","issues_url":"https://api.github.com/repos/kokosing/presto/issues{/number}","pulls_url":"https://api.github.com/repos/kokosing/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/kokosing/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/kokosing/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kokosing/presto/labels{/name}","releases_url":"https://api.github.com/repos/kokosing/presto/releases{/id}","deployments_url":"https://api.github.com/repos/kokosing/presto/deployments","created_at":"2016-04-11T04:52:12Z","updated_at":"2016-04-11T04:52:24Z","pushed_at":"2018-07-20T08:48:08Z","git_url":"git://github.com/kokosing/presto.git","ssh_url":"git@github.com:kokosing/presto.git","clone_url":"https://github.com/kokosing/presto.git","svn_url":"https://github.com/kokosing/presto","homepage":"https://prestodb.io","size":98723,"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":{"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"5f94f9b424364341b65722f90bfcd9f5504651e9","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","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},"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-07-20T09:27:04Z","pushed_at":"2018-07-20T13:34:22Z","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":93958,"stargazers_count":7799,"watchers_count":7799,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2649,"mirror_url":null,"archived":false,"open_issues_count":1333,"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":2649,"open_issues":1333,"watchers":7799,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/11092"},"html":{"href":"https://github.com/prestodb/presto/pull/11092"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/11092"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/11092/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/11092/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/11092/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/d359285fe88b25e84ab7df5cf3cb6b2a26b45f25"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sopel39"}}