{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/11371","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/11371/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/11371/comments","events_url":"https://api.github.com/repos/apache/spark/issues/11371/events","html_url":"https://github.com/apache/spark/pull/11371","id":136432701,"number":11371,"title":"[SPARK-13484][SQL] Prevent illegal NULL propagation when filtering outer-join results","user":{"login":"maropu","id":692303,"avatar_url":"https://avatars.githubusercontent.com/u/692303?v=3","gravatar_id":"","url":"https://api.github.com/users/maropu","html_url":"https://github.com/maropu","followers_url":"https://api.github.com/users/maropu/followers","following_url":"https://api.github.com/users/maropu/following{/other_user}","gists_url":"https://api.github.com/users/maropu/gists{/gist_id}","starred_url":"https://api.github.com/users/maropu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maropu/subscriptions","organizations_url":"https://api.github.com/users/maropu/orgs","repos_url":"https://api.github.com/users/maropu/repos","events_url":"https://api.github.com/users/maropu/events{/privacy}","received_events_url":"https://api.github.com/users/maropu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-25T16:11:44Z","updated_at":"2016-02-26T03:22:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11371","html_url":"https://github.com/apache/spark/pull/11371","diff_url":"https://github.com/apache/spark/pull/11371.diff","patch_url":"https://github.com/apache/spark/pull/11371.patch"},"body":"## What changes were proposed in this pull request?\r\nThis pr is to prevent illegal NULL propagation in the query below;\r\n```\r\nval a = sqlContext.range(10).select(col(\"id\"), lit(0).as(\"count\"))\r\nval b = sqlContext.range(10).select((col(\"id\") % 3).as(\"id\")).groupBy(\"id\").count()\r\na.join(b, a(\"id\") === b(\"id\"), \"left_outer\").filter(b(\"count\").isNull)\r\n```\r\nIt returns nothing because `b(\"count\")` is not nullable and the filter condition is always false by `Optimizer`.\r\n\r\n## How was this patch tested?\r\nAdded a test for the query above in `DataFrameJoinSuite`.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/189093314","html_url":"https://github.com/apache/spark/pull/11371#issuecomment-189093314","issue_url":"https://api.github.com/repos/apache/spark/issues/11371","id":189093314,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T03:22:40Z","updated_at":"2016-02-26T03:22:40Z","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52013/\nTest PASSed."}}