{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/57490820","id":57490820,"diff_hunk":"@@ -402,13 +404,7 @@ final class DataFrameNaFunctions private[sql](df: DataFrame) {\n    * Returns a [[Column]] expression that replaces null value in `col` with `replacement`.\n    */\n   private def fillCol[T](col: StructField, replacement: T): Column = {\n-    col.dataType match {\n-      case DoubleType | FloatType =>\n-        coalesce(nanvl(df.col(\"`\" + col.name + \"`\"), lit(null)),","path":"sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala","position":36,"original_position":36,"commit_id":"834ee699b209cd417d0d87b2ee7ed62910573979","original_commit_id":"834ee699b209cd417d0d87b2ee7ed62910573979","user":{"login":"traviscrawford","id":112258,"avatar_url":"https://avatars.githubusercontent.com/u/112258?v=3","gravatar_id":"","url":"https://api.github.com/users/traviscrawford","html_url":"https://github.com/traviscrawford","followers_url":"https://api.github.com/users/traviscrawford/followers","following_url":"https://api.github.com/users/traviscrawford/following{/other_user}","gists_url":"https://api.github.com/users/traviscrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/traviscrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviscrawford/subscriptions","organizations_url":"https://api.github.com/users/traviscrawford/orgs","repos_url":"https://api.github.com/users/traviscrawford/repos","events_url":"https://api.github.com/users/traviscrawford/events{/privacy}","received_events_url":"https://api.github.com/users/traviscrawford/received_events","type":"User","site_admin":false},"body":"The data type pattern match has been removed because I believe its unnecessary. I'm happy to put this back, along with a comment describing what special-case it covers, if someone can clue me into why its needed.","created_at":"2016-03-25T21:02:56Z","updated_at":"2016-03-25T21:02:56Z","html_url":"https://github.com/apache/spark/pull/11967#discussion_r57490820","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/11967","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/57490820"},"html":{"href":"https://github.com/apache/spark/pull/11967#discussion_r57490820"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/11967"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11967","id":64206945,"html_url":"https://github.com/apache/spark/pull/11967","diff_url":"https://github.com/apache/spark/pull/11967.diff","patch_url":"https://github.com/apache/spark/pull/11967.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/11967","number":11967,"state":"open","locked":false,"title":"[SPARK-14081][SQL] - Update DataFrameNaFunctions.fill to preserve column dat…","user":{"login":"traviscrawford","id":112258,"avatar_url":"https://avatars.githubusercontent.com/u/112258?v=3","gravatar_id":"","url":"https://api.github.com/users/traviscrawford","html_url":"https://github.com/traviscrawford","followers_url":"https://api.github.com/users/traviscrawford/followers","following_url":"https://api.github.com/users/traviscrawford/following{/other_user}","gists_url":"https://api.github.com/users/traviscrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/traviscrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviscrawford/subscriptions","organizations_url":"https://api.github.com/users/traviscrawford/orgs","repos_url":"https://api.github.com/users/traviscrawford/repos","events_url":"https://api.github.com/users/traviscrawford/events{/privacy}","received_events_url":"https://api.github.com/users/traviscrawford/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\nThis change resolves an issue where `DataFrameNaFunctions.fill` changes a `FloatType` column to a `DoubleType`. We also clarify the contract that replacement values will be cast to the column data type, which may change the replacement value when casting to a lower precision type.\r\n\r\n## How was this patch tested?\r\nThis patch has associated unit tests.\r\n\r\n\r\nThis is my first Spark contribution, and I believe the process described at https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark#ContributingtoSpark-ContributingCodeChanges has been followed. Apologies if I've missed anything.","created_at":"2016-03-25T20:59:53Z","updated_at":"2016-03-25T21:02:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4403ca14c4752ede6e1a45e5670ef64b0db7ad6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/11967/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/11967/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/11967/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/834ee699b209cd417d0d87b2ee7ed62910573979","head":{"label":"traviscrawford:SPARK-14081-dataframena","ref":"SPARK-14081-dataframena","sha":"834ee699b209cd417d0d87b2ee7ed62910573979","user":{"login":"traviscrawford","id":112258,"avatar_url":"https://avatars.githubusercontent.com/u/112258?v=3","gravatar_id":"","url":"https://api.github.com/users/traviscrawford","html_url":"https://github.com/traviscrawford","followers_url":"https://api.github.com/users/traviscrawford/followers","following_url":"https://api.github.com/users/traviscrawford/following{/other_user}","gists_url":"https://api.github.com/users/traviscrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/traviscrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviscrawford/subscriptions","organizations_url":"https://api.github.com/users/traviscrawford/orgs","repos_url":"https://api.github.com/users/traviscrawford/repos","events_url":"https://api.github.com/users/traviscrawford/events{/privacy}","received_events_url":"https://api.github.com/users/traviscrawford/received_events","type":"User","site_admin":false},"repo":{"id":54589061,"name":"spark","full_name":"traviscrawford/spark","owner":{"login":"traviscrawford","id":112258,"avatar_url":"https://avatars.githubusercontent.com/u/112258?v=3","gravatar_id":"","url":"https://api.github.com/users/traviscrawford","html_url":"https://github.com/traviscrawford","followers_url":"https://api.github.com/users/traviscrawford/followers","following_url":"https://api.github.com/users/traviscrawford/following{/other_user}","gists_url":"https://api.github.com/users/traviscrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/traviscrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviscrawford/subscriptions","organizations_url":"https://api.github.com/users/traviscrawford/orgs","repos_url":"https://api.github.com/users/traviscrawford/repos","events_url":"https://api.github.com/users/traviscrawford/events{/privacy}","received_events_url":"https://api.github.com/users/traviscrawford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/traviscrawford/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/traviscrawford/spark","forks_url":"https://api.github.com/repos/traviscrawford/spark/forks","keys_url":"https://api.github.com/repos/traviscrawford/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/traviscrawford/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/traviscrawford/spark/teams","hooks_url":"https://api.github.com/repos/traviscrawford/spark/hooks","issue_events_url":"https://api.github.com/repos/traviscrawford/spark/issues/events{/number}","events_url":"https://api.github.com/repos/traviscrawford/spark/events","assignees_url":"https://api.github.com/repos/traviscrawford/spark/assignees{/user}","branches_url":"https://api.github.com/repos/traviscrawford/spark/branches{/branch}","tags_url":"https://api.github.com/repos/traviscrawford/spark/tags","blobs_url":"https://api.github.com/repos/traviscrawford/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/traviscrawford/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/traviscrawford/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/traviscrawford/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/traviscrawford/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/traviscrawford/spark/languages","stargazers_url":"https://api.github.com/repos/traviscrawford/spark/stargazers","contributors_url":"https://api.github.com/repos/traviscrawford/spark/contributors","subscribers_url":"https://api.github.com/repos/traviscrawford/spark/subscribers","subscription_url":"https://api.github.com/repos/traviscrawford/spark/subscription","commits_url":"https://api.github.com/repos/traviscrawford/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/traviscrawford/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/traviscrawford/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/traviscrawford/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/traviscrawford/spark/contents/{+path}","compare_url":"https://api.github.com/repos/traviscrawford/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/traviscrawford/spark/merges","archive_url":"https://api.github.com/repos/traviscrawford/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/traviscrawford/spark/downloads","issues_url":"https://api.github.com/repos/traviscrawford/spark/issues{/number}","pulls_url":"https://api.github.com/repos/traviscrawford/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/traviscrawford/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/traviscrawford/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/traviscrawford/spark/labels{/name}","releases_url":"https://api.github.com/repos/traviscrawford/spark/releases{/id}","deployments_url":"https://api.github.com/repos/traviscrawford/spark/deployments","created_at":"2016-03-23T19:56:59Z","updated_at":"2016-03-23T19:57:21Z","pushed_at":"2016-03-25T20:51:54Z","git_url":"git://github.com/traviscrawford/spark.git","ssh_url":"git@github.com:traviscrawford/spark.git","clone_url":"https://github.com/traviscrawford/spark.git","svn_url":"https://github.com/traviscrawford/spark","homepage":null,"size":154424,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"apache:master","ref":"master","sha":"b554b3c46b0019a6caf0f9a975b460dc2570c3b2","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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://avatars.githubusercontent.com/u/47359?v=3","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":"2016-03-25T18:37:34Z","pushed_at":"2016-03-25T21:00:18Z","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":447528,"stargazers_count":7923,"watchers_count":7923,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7304,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":416,"forks":7304,"open_issues":416,"watchers":7923,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/11967"},"html":{"href":"https://github.com/apache/spark/pull/11967"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/11967"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/11967/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/11967/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/11967/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/834ee699b209cd417d0d87b2ee7ed62910573979"}}}}