{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/17251","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/17251/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/17251/comments","events_url":"https://api.github.com/repos/apache/spark/issues/17251/events","html_url":"https://github.com/apache/spark/pull/17251","id":213463071,"number":17251,"title":"[SPARK-19910][SQL] `stack` should not reject NULL values due to type mismatch","user":{"login":"dongjoon-hyun","id":9700541,"avatar_url":"https://avatars1.githubusercontent.com/u/9700541?v=3","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-10T21:59:09Z","updated_at":"2017-03-11T01:32:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/17251","html_url":"https://github.com/apache/spark/pull/17251","diff_url":"https://github.com/apache/spark/pull/17251.diff","patch_url":"https://github.com/apache/spark/pull/17251.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nSince `stack` function generates a table with nullable columns, it should allow mixed null values.\r\n\r\n```scala\r\nscala> sql(\"select stack(3, 1, 2, 3)\").printSchema\r\nroot\r\n |-- col0: integer (nullable = true)\r\n\r\nscala> sql(\"select stack(3, 1, 2, null)\").printSchema\r\norg.apache.spark.sql.AnalysisException: cannot resolve 'stack(3, 1, 2, NULL)' due to data type mismatch: Argument 1 (IntegerType) != Argument 3 (NullType); line 1 pos 7;\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nPass the Jenkins with a new test case."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/285828914","html_url":"https://github.com/apache/spark/pull/17251#issuecomment-285828914","issue_url":"https://api.github.com/repos/apache/spark/issues/17251","id":285828914,"user":{"login":"dongjoon-hyun","id":9700541,"avatar_url":"https://avatars1.githubusercontent.com/u/9700541?v=3","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"created_at":"2017-03-11T01:32:11Z","updated_at":"2017-03-11T01:32:11Z","body":"For `stack` function, we cannot use `ExpectsInputTypes` or `ImplicitCastInputTypes`, do we?"}}
{"actor":{"display_login":"dongjoon-hyun"}}