{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/171182439","pull_request_review_id":99989135,"id":171182439,"diff_hunk":"@@ -192,4 +192,17 @@ class InferFiltersFromConstraintsSuite extends PlanTest {\n \n     comparePlans(Optimize.execute(original.analyze), correct.analyze)\n   }\n+\n+  test(\"SPARK-23405:single left-semi join, filter out nulls on either side on equi-join keys\") {","path":"sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/InferFiltersFromConstraintsSuite.scala","position":5,"original_position":5,"commit_id":"b3f2ade5f1dc2ad3349f4dc21fe353590e8bbbfd","original_commit_id":"b3f2ade5f1dc2ad3349f4dc21fe353590e8bbbfd","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars3.githubusercontent.com/u/3182036?v=4","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"body":"nit: `SPARK-23405: left-semi equa-join should filter out null join keys on both sides`","created_at":"2018-02-28T09:21:15Z","updated_at":"2018-02-28T09:21:15Z","html_url":"https://github.com/apache/spark/pull/20670#discussion_r171182439","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/20670","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/171182439"},"html":{"href":"https://github.com/apache/spark/pull/20670#discussion_r171182439"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/20670"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/20670","id":171217306,"html_url":"https://github.com/apache/spark/pull/20670","diff_url":"https://github.com/apache/spark/pull/20670.diff","patch_url":"https://github.com/apache/spark/pull/20670.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/20670","number":20670,"state":"open","locked":false,"title":"[SPARK-23405] Generate additional constraints for Join's children","user":{"login":"KaiXinXiaoLei","id":9440626,"avatar_url":"https://avatars1.githubusercontent.com/u/9440626?v=4","gravatar_id":"","url":"https://api.github.com/users/KaiXinXiaoLei","html_url":"https://github.com/KaiXinXiaoLei","followers_url":"https://api.github.com/users/KaiXinXiaoLei/followers","following_url":"https://api.github.com/users/KaiXinXiaoLei/following{/other_user}","gists_url":"https://api.github.com/users/KaiXinXiaoLei/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiXinXiaoLei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiXinXiaoLei/subscriptions","organizations_url":"https://api.github.com/users/KaiXinXiaoLei/orgs","repos_url":"https://api.github.com/users/KaiXinXiaoLei/repos","events_url":"https://api.github.com/users/KaiXinXiaoLei/events{/privacy}","received_events_url":"https://api.github.com/users/KaiXinXiaoLei/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\n(Please fill in changes proposed in this fix)\r\nI run a sql: `select ls.cs_order_number from ls left semi join catalog_sales cs on ls.cs_order_number = cs.cs_order_number`, The `ls` table is a small table ,and the number is one. The `catalog_sales` table is a big table,  and the number is 10 billion. The task will be hang up. And i find the many null values of `cs_order_number` in the `catalog_sales` table. I think the null value should be removed in the logical plan.\r\n\r\n>== Optimized Logical Plan ==\r\n>Join LeftSemi, (cs_order_number#1 = cs_order_number#22)\r\n>:- Project cs_order_number#1\r\n>   : +- Filter isnotnull(cs_order_number#1)\r\n>      : +- MetastoreRelation 100t, ls\r\n>+- Project cs_order_number#22\r\n>   +- MetastoreRelation 100t, catalog_sales\r\n\r\nNow, use this patch, the plan will be:\r\n>== Optimized Logical Plan ==\r\n>Join LeftSemi, (cs_order_number#1 = cs_order_number#22)\r\n>:- Project cs_order_number#1\r\n>   : +- Filter isnotnull(cs_order_number#1)\r\n>      : +- MetastoreRelation 100t, ls\r\n>+- Project cs_order_number#22\r\n>   : **+- Filter isnotnull(cs_order_number#22)**\r\n>     :+- MetastoreRelation 100t, catalog_sales\r\n\r\n## How was this patch tested?\r\n\r\n(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)\r\n(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)\r\n\r\n\r\nPlease review http://spark.apache.org/contributing.html before opening a pull request.\r\n","created_at":"2018-02-25T07:21:02Z","updated_at":"2018-02-28T09:21:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c9b8326f2d2f19d4d056cf6e8e725d4510852ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/20670/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/20670/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/20670/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/b3f2ade5f1dc2ad3349f4dc21fe353590e8bbbfd","head":{"label":"KaiXinXiaoLei:Spark-23405","ref":"Spark-23405","sha":"b3f2ade5f1dc2ad3349f4dc21fe353590e8bbbfd","user":{"login":"KaiXinXiaoLei","id":9440626,"avatar_url":"https://avatars1.githubusercontent.com/u/9440626?v=4","gravatar_id":"","url":"https://api.github.com/users/KaiXinXiaoLei","html_url":"https://github.com/KaiXinXiaoLei","followers_url":"https://api.github.com/users/KaiXinXiaoLei/followers","following_url":"https://api.github.com/users/KaiXinXiaoLei/following{/other_user}","gists_url":"https://api.github.com/users/KaiXinXiaoLei/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiXinXiaoLei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiXinXiaoLei/subscriptions","organizations_url":"https://api.github.com/users/KaiXinXiaoLei/orgs","repos_url":"https://api.github.com/users/KaiXinXiaoLei/repos","events_url":"https://api.github.com/users/KaiXinXiaoLei/events{/privacy}","received_events_url":"https://api.github.com/users/KaiXinXiaoLei/received_events","type":"User","site_admin":false},"repo":{"id":25898697,"name":"spark","full_name":"KaiXinXiaoLei/spark","owner":{"login":"KaiXinXiaoLei","id":9440626,"avatar_url":"https://avatars1.githubusercontent.com/u/9440626?v=4","gravatar_id":"","url":"https://api.github.com/users/KaiXinXiaoLei","html_url":"https://github.com/KaiXinXiaoLei","followers_url":"https://api.github.com/users/KaiXinXiaoLei/followers","following_url":"https://api.github.com/users/KaiXinXiaoLei/following{/other_user}","gists_url":"https://api.github.com/users/KaiXinXiaoLei/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiXinXiaoLei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiXinXiaoLei/subscriptions","organizations_url":"https://api.github.com/users/KaiXinXiaoLei/orgs","repos_url":"https://api.github.com/users/KaiXinXiaoLei/repos","events_url":"https://api.github.com/users/KaiXinXiaoLei/events{/privacy}","received_events_url":"https://api.github.com/users/KaiXinXiaoLei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KaiXinXiaoLei/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/KaiXinXiaoLei/spark","forks_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/forks","keys_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/teams","hooks_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/hooks","issue_events_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/issues/events{/number}","events_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/events","assignees_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/assignees{/user}","branches_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/branches{/branch}","tags_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/tags","blobs_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/languages","stargazers_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/stargazers","contributors_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/contributors","subscribers_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/subscribers","subscription_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/subscription","commits_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/contents/{+path}","compare_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/merges","archive_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/downloads","issues_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/issues{/number}","pulls_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/labels{/name}","releases_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/releases{/id}","deployments_url":"https://api.github.com/repos/KaiXinXiaoLei/spark/deployments","created_at":"2014-10-29T01:33:27Z","updated_at":"2015-04-17T08:31:11Z","pushed_at":"2018-02-28T09:11:01Z","git_url":"git://github.com/KaiXinXiaoLei/spark.git","ssh_url":"git@github.com:KaiXinXiaoLei/spark.git","clone_url":"https://github.com/KaiXinXiaoLei/spark.git","svn_url":"https://github.com/KaiXinXiaoLei/spark","homepage":null,"size":248117,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"1a198ce8f580bcf35b9cbfab403fc40f821046a1","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2018-02-28T08:31:01Z","pushed_at":"2018-02-28T09:11:11Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":268407,"stargazers_count":16287,"watchers_count":16287,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15065,"mirror_url":null,"archived":false,"open_issues_count":439,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":15065,"open_issues":439,"watchers":16287,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/20670"},"html":{"href":"https://github.com/apache/spark/pull/20670"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/20670"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/20670/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/20670/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/20670/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/b3f2ade5f1dc2ad3349f4dc21fe353590e8bbbfd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cloud-fan"}}