{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/65787203","id":65787203,"diff_hunk":"@@ -58,7 +58,7 @@ public PlanNode visitApply(ApplyNode node, RewriteContext<PlanNode> context)\n                 // only scalar subquery wraps expression in EnforceSingleRowNode\n                 return new JoinNode(\n                         idAllocator.getNextId(),\n-                        JoinNode.Type.FULL,\n+                        JoinNode.Type.INNER,","path":"presto-main/src/main/java/com/facebook/presto/sql/planner/optimizations/TransformUncorrelatedScalarToJoin.java","position":5,"original_position":5,"commit_id":"c46ccfc8e8a8c8075b8a4c283b5dfc0877d9185b","original_commit_id":"747fdf5447f657617a33b28b0cf4363546447dba","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":"This was a bug actually. And worked incidentally because we converted any \r\nJoin without conditions into NestedLoopJoin (which was not correct for OUTER for case where INNER table was empty).\r\n\r\nAfter changing that in LocalExecutionPlanner:\r\n\r\n```\r\n+            if (clauses.isEmpty() && !node.getFilter().isPresent() && node.getType() == INNER) {\r\n                  return createNestedLoopJoin(node, context);\r\n              }\r\n```\r\n\r\nthis stopped working.","created_at":"2016-06-03T22:55:17Z","updated_at":"2016-06-03T22:55:17Z","html_url":"https://github.com/prestodb/presto/pull/5403#discussion_r65787203","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/5403","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/65787203"},"html":{"href":"https://github.com/prestodb/presto/pull/5403#discussion_r65787203"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5403"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/5403","id":72499741,"html_url":"https://github.com/prestodb/presto/pull/5403","diff_url":"https://github.com/prestodb/presto/pull/5403.diff","patch_url":"https://github.com/prestodb/presto/pull/5403.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/5403","number":5403,"state":"open","locked":false,"title":"Fix nonequality join predicate pushdown","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":"","created_at":"2016-06-03T12:33:23Z","updated_at":"2016-06-03T22:55:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5424a55b296c5e9d13f0a03df4ab629f442639e3","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/5403/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/5403/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/5403/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/c46ccfc8e8a8c8075b8a4c283b5dfc0877d9185b","head":{"label":"losipiuk:fix-nonequality-join-predicate-pushdown","ref":"fix-nonequality-join-predicate-pushdown","sha":"c46ccfc8e8a8c8075b8a4c283b5dfc0877d9185b","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},"repo":{"id":37843304,"name":"presto","full_name":"losipiuk/presto","owner":{"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},"private":false,"html_url":"https://github.com/losipiuk/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":true,"url":"https://api.github.com/repos/losipiuk/presto","forks_url":"https://api.github.com/repos/losipiuk/presto/forks","keys_url":"https://api.github.com/repos/losipiuk/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/losipiuk/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/losipiuk/presto/teams","hooks_url":"https://api.github.com/repos/losipiuk/presto/hooks","issue_events_url":"https://api.github.com/repos/losipiuk/presto/issues/events{/number}","events_url":"https://api.github.com/repos/losipiuk/presto/events","assignees_url":"https://api.github.com/repos/losipiuk/presto/assignees{/user}","branches_url":"https://api.github.com/repos/losipiuk/presto/branches{/branch}","tags_url":"https://api.github.com/repos/losipiuk/presto/tags","blobs_url":"https://api.github.com/repos/losipiuk/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/losipiuk/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/losipiuk/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/losipiuk/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/losipiuk/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/losipiuk/presto/languages","stargazers_url":"https://api.github.com/repos/losipiuk/presto/stargazers","contributors_url":"https://api.github.com/repos/losipiuk/presto/contributors","subscribers_url":"https://api.github.com/repos/losipiuk/presto/subscribers","subscription_url":"https://api.github.com/repos/losipiuk/presto/subscription","commits_url":"https://api.github.com/repos/losipiuk/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/losipiuk/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/losipiuk/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/losipiuk/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/losipiuk/presto/contents/{+path}","compare_url":"https://api.github.com/repos/losipiuk/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/losipiuk/presto/merges","archive_url":"https://api.github.com/repos/losipiuk/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/losipiuk/presto/downloads","issues_url":"https://api.github.com/repos/losipiuk/presto/issues{/number}","pulls_url":"https://api.github.com/repos/losipiuk/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/losipiuk/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/losipiuk/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/losipiuk/presto/labels{/name}","releases_url":"https://api.github.com/repos/losipiuk/presto/releases{/id}","deployments_url":"https://api.github.com/repos/losipiuk/presto/deployments","created_at":"2015-06-22T07:47:05Z","updated_at":"2016-03-18T00:24:50Z","pushed_at":"2016-06-03T22:42:05Z","git_url":"git://github.com/losipiuk/presto.git","ssh_url":"git@github.com:losipiuk/presto.git","clone_url":"https://github.com/losipiuk/presto.git","svn_url":"https://github.com/losipiuk/presto","homepage":"https://prestodb.io","size":127544,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"a2eea25602b7e73dd496a70ca0c30fb44e07c098","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-06-03T19:14:18Z","pushed_at":"2016-06-03T22:42: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":153994,"stargazers_count":4790,"watchers_count":4790,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1422,"mirror_url":null,"open_issues_count":542,"forks":1422,"open_issues":542,"watchers":4790,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5403"},"html":{"href":"https://github.com/prestodb/presto/pull/5403"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/5403"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/5403/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5403/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5403/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/c46ccfc8e8a8c8075b8a4c283b5dfc0877d9185b"}}}}
{"actor":{"display_login":"losipiuk"}}