{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/93969131","pull_request_review_id":14499931,"id":93969131,"diff_hunk":"@@ -212,11 +212,11 @@ public Expression rewriteExpression(Expression node, NodeContext context, Expres\n         @Override\n         public Expression rewriteLogicalBinaryExpression(LogicalBinaryExpression node, NodeContext context, ExpressionTreeRewriter<NodeContext> treeRewriter)\n         {\n-            List<Expression> predicates = extractPredicates(node.getType(), node).stream()\n-                    .map(expression -> treeRewriter.rewrite(expression, NodeContext.NOT_ROOT_NODE))\n-                    .collect(toImmutableList());\n+            Expression expression = combinePredicates(node.getType(), extractPredicates(node.getType(), node).stream()","path":"presto-main/src/main/java/com/facebook/presto/sql/planner/optimizations/SimplifyExpressions.java","position":7,"original_position":7,"commit_id":"79a3520f393788d84a08ac50a9c22ca2d647d15d","original_commit_id":"79a3520f393788d84a08ac50a9c22ca2d647d15d","user":{"login":"erichwang","id":737851,"avatar_url":"https://avatars.githubusercontent.com/u/737851?v=3","gravatar_id":"","url":"https://api.github.com/users/erichwang","html_url":"https://github.com/erichwang","followers_url":"https://api.github.com/users/erichwang/followers","following_url":"https://api.github.com/users/erichwang/following{/other_user}","gists_url":"https://api.github.com/users/erichwang/gists{/gist_id}","starred_url":"https://api.github.com/users/erichwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichwang/subscriptions","organizations_url":"https://api.github.com/users/erichwang/orgs","repos_url":"https://api.github.com/users/erichwang/repos","events_url":"https://api.github.com/users/erichwang/events{/privacy}","received_events_url":"https://api.github.com/users/erichwang/received_events","type":"User","site_admin":false},"body":"Yea, I think this does the same thing. I'm impartial to either approach. If we go with this suggestion, we should leave a comment as to why we need to re-extract the predicates from the result.","created_at":"2016-12-27T20:45:34Z","updated_at":"2016-12-27T20:45:34Z","html_url":"https://github.com/prestodb/presto/pull/6958#discussion_r93969131","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/6958","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/93969131"},"html":{"href":"https://github.com/prestodb/presto/pull/6958#discussion_r93969131"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6958"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/6958","id":99205057,"html_url":"https://github.com/prestodb/presto/pull/6958","diff_url":"https://github.com/prestodb/presto/pull/6958.diff","patch_url":"https://github.com/prestodb/presto/pull/6958.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/6958","number":6958,"state":"open","locked":false,"title":"Fix logical expression optimization","user":{"login":"ggreg","id":190738,"avatar_url":"https://avatars.githubusercontent.com/u/190738?v=3","gravatar_id":"","url":"https://api.github.com/users/ggreg","html_url":"https://github.com/ggreg","followers_url":"https://api.github.com/users/ggreg/followers","following_url":"https://api.github.com/users/ggreg/following{/other_user}","gists_url":"https://api.github.com/users/ggreg/gists{/gist_id}","starred_url":"https://api.github.com/users/ggreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggreg/subscriptions","organizations_url":"https://api.github.com/users/ggreg/orgs","repos_url":"https://api.github.com/users/ggreg/repos","events_url":"https://api.github.com/users/ggreg/events{/privacy}","received_events_url":"https://api.github.com/users/ggreg/received_events","type":"User","site_admin":false},"body":"Fixes #6954.\r\n\r\nThis is a tentative fix written with @erichwang.","created_at":"2016-12-23T05:46:39Z","updated_at":"2016-12-27T20:45:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5de44027a23b17e7d47d36f11dd51edfec053a14","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/6958/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/6958/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/6958/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/79a3520f393788d84a08ac50a9c22ca2d647d15d","head":{"label":"ggreg:master","ref":"master","sha":"79a3520f393788d84a08ac50a9c22ca2d647d15d","user":{"login":"ggreg","id":190738,"avatar_url":"https://avatars.githubusercontent.com/u/190738?v=3","gravatar_id":"","url":"https://api.github.com/users/ggreg","html_url":"https://github.com/ggreg","followers_url":"https://api.github.com/users/ggreg/followers","following_url":"https://api.github.com/users/ggreg/following{/other_user}","gists_url":"https://api.github.com/users/ggreg/gists{/gist_id}","starred_url":"https://api.github.com/users/ggreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggreg/subscriptions","organizations_url":"https://api.github.com/users/ggreg/orgs","repos_url":"https://api.github.com/users/ggreg/repos","events_url":"https://api.github.com/users/ggreg/events{/privacy}","received_events_url":"https://api.github.com/users/ggreg/received_events","type":"User","site_admin":false},"repo":{"id":60217813,"name":"presto","full_name":"ggreg/presto","owner":{"login":"ggreg","id":190738,"avatar_url":"https://avatars.githubusercontent.com/u/190738?v=3","gravatar_id":"","url":"https://api.github.com/users/ggreg","html_url":"https://github.com/ggreg","followers_url":"https://api.github.com/users/ggreg/followers","following_url":"https://api.github.com/users/ggreg/following{/other_user}","gists_url":"https://api.github.com/users/ggreg/gists{/gist_id}","starred_url":"https://api.github.com/users/ggreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggreg/subscriptions","organizations_url":"https://api.github.com/users/ggreg/orgs","repos_url":"https://api.github.com/users/ggreg/repos","events_url":"https://api.github.com/users/ggreg/events{/privacy}","received_events_url":"https://api.github.com/users/ggreg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ggreg/presto","description":"Distributed SQL query engine for big data","fork":true,"url":"https://api.github.com/repos/ggreg/presto","forks_url":"https://api.github.com/repos/ggreg/presto/forks","keys_url":"https://api.github.com/repos/ggreg/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ggreg/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ggreg/presto/teams","hooks_url":"https://api.github.com/repos/ggreg/presto/hooks","issue_events_url":"https://api.github.com/repos/ggreg/presto/issues/events{/number}","events_url":"https://api.github.com/repos/ggreg/presto/events","assignees_url":"https://api.github.com/repos/ggreg/presto/assignees{/user}","branches_url":"https://api.github.com/repos/ggreg/presto/branches{/branch}","tags_url":"https://api.github.com/repos/ggreg/presto/tags","blobs_url":"https://api.github.com/repos/ggreg/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ggreg/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ggreg/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/ggreg/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ggreg/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/ggreg/presto/languages","stargazers_url":"https://api.github.com/repos/ggreg/presto/stargazers","contributors_url":"https://api.github.com/repos/ggreg/presto/contributors","subscribers_url":"https://api.github.com/repos/ggreg/presto/subscribers","subscription_url":"https://api.github.com/repos/ggreg/presto/subscription","commits_url":"https://api.github.com/repos/ggreg/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/ggreg/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/ggreg/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/ggreg/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/ggreg/presto/contents/{+path}","compare_url":"https://api.github.com/repos/ggreg/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ggreg/presto/merges","archive_url":"https://api.github.com/repos/ggreg/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ggreg/presto/downloads","issues_url":"https://api.github.com/repos/ggreg/presto/issues{/number}","pulls_url":"https://api.github.com/repos/ggreg/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/ggreg/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/ggreg/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ggreg/presto/labels{/name}","releases_url":"https://api.github.com/repos/ggreg/presto/releases{/id}","deployments_url":"https://api.github.com/repos/ggreg/presto/deployments","created_at":"2016-06-01T23:35:11Z","updated_at":"2016-06-01T23:35:24Z","pushed_at":"2016-12-23T05:44:45Z","git_url":"git://github.com/ggreg/presto.git","ssh_url":"git@github.com:ggreg/presto.git","clone_url":"https://github.com/ggreg/presto.git","svn_url":"https://github.com/ggreg/presto","homepage":"https://prestodb.io","size":63920,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"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-27T17:56:52Z","pushed_at":"2016-12-27T18:52: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":"https://prestodb.io","size":64233,"stargazers_count":5443,"watchers_count":5443,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1716,"mirror_url":null,"open_issues_count":825,"forks":1716,"open_issues":825,"watchers":5443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6958"},"html":{"href":"https://github.com/prestodb/presto/pull/6958"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/6958"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/6958/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6958/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/6958/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/79a3520f393788d84a08ac50a9c22ca2d647d15d"}}}}
{"actor":{"display_login":"erichwang"}}