{"action":"closed","number":6551,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6551","id":36612460,"html_url":"https://github.com/apache/spark/pull/6551","diff_url":"https://github.com/apache/spark/pull/6551.diff","patch_url":"https://github.com/apache/spark/pull/6551.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/6551","number":6551,"state":"closed","locked":false,"title":"[SPARK-8010][SQL]Promote types to StringType as implicit conversion in non-binary expression of HiveTypeCoercion","user":{"login":"OopsOutOfMemory","id":6489401,"avatar_url":"https://avatars.githubusercontent.com/u/6489401?v=3","gravatar_id":"","url":"https://api.github.com/users/OopsOutOfMemory","html_url":"https://github.com/OopsOutOfMemory","followers_url":"https://api.github.com/users/OopsOutOfMemory/followers","following_url":"https://api.github.com/users/OopsOutOfMemory/following{/other_user}","gists_url":"https://api.github.com/users/OopsOutOfMemory/gists{/gist_id}","starred_url":"https://api.github.com/users/OopsOutOfMemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OopsOutOfMemory/subscriptions","organizations_url":"https://api.github.com/users/OopsOutOfMemory/orgs","repos_url":"https://api.github.com/users/OopsOutOfMemory/repos","events_url":"https://api.github.com/users/OopsOutOfMemory/events{/privacy}","received_events_url":"https://api.github.com/users/OopsOutOfMemory/received_events","type":"User","site_admin":false},"body":"1. Given a query\r\n`select coalesce(null, 1, '1') from dual` will cause exception:\r\njava.lang.RuntimeException: Could not determine return type of Coalesce for IntegerType,StringType\r\n2. Given a query:\r\n`select case when true then 1 else '1' end from dual` will cause exception:\r\njava.lang.RuntimeException: Types in CASE WHEN must be the same or coercible to a common type: StringType != IntegerType\r\nI checked the code, the main cause is the HiveTypeCoercion doesn't do implicit convert when there is a IntegerType and StringType.\r\n\r\nNumeric types can be promoted to string type\r\n\r\nHive will always do this implicit conversion.","created_at":"2015-06-01T09:38:27Z","updated_at":"2015-06-17T20:39:10Z","closed_at":"2015-06-17T20:39:10Z","merged_at":null,"merge_commit_sha":"e46d4d9ac406604363f6dfec5238c9b7eb038251","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/6551/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/6551/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/6551/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/7a209d7d02af0fc6427a967ac35145bc5e3e3383","head":{"label":"OopsOutOfMemory:pnts","ref":"pnts","sha":"7a209d7d02af0fc6427a967ac35145bc5e3e3383","user":{"login":"OopsOutOfMemory","id":6489401,"avatar_url":"https://avatars.githubusercontent.com/u/6489401?v=3","gravatar_id":"","url":"https://api.github.com/users/OopsOutOfMemory","html_url":"https://github.com/OopsOutOfMemory","followers_url":"https://api.github.com/users/OopsOutOfMemory/followers","following_url":"https://api.github.com/users/OopsOutOfMemory/following{/other_user}","gists_url":"https://api.github.com/users/OopsOutOfMemory/gists{/gist_id}","starred_url":"https://api.github.com/users/OopsOutOfMemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OopsOutOfMemory/subscriptions","organizations_url":"https://api.github.com/users/OopsOutOfMemory/orgs","repos_url":"https://api.github.com/users/OopsOutOfMemory/repos","events_url":"https://api.github.com/users/OopsOutOfMemory/events{/privacy}","received_events_url":"https://api.github.com/users/OopsOutOfMemory/received_events","type":"User","site_admin":false},"repo":{"id":25780227,"name":"spark","full_name":"OopsOutOfMemory/spark","owner":{"login":"OopsOutOfMemory","id":6489401,"avatar_url":"https://avatars.githubusercontent.com/u/6489401?v=3","gravatar_id":"","url":"https://api.github.com/users/OopsOutOfMemory","html_url":"https://github.com/OopsOutOfMemory","followers_url":"https://api.github.com/users/OopsOutOfMemory/followers","following_url":"https://api.github.com/users/OopsOutOfMemory/following{/other_user}","gists_url":"https://api.github.com/users/OopsOutOfMemory/gists{/gist_id}","starred_url":"https://api.github.com/users/OopsOutOfMemory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OopsOutOfMemory/subscriptions","organizations_url":"https://api.github.com/users/OopsOutOfMemory/orgs","repos_url":"https://api.github.com/users/OopsOutOfMemory/repos","events_url":"https://api.github.com/users/OopsOutOfMemory/events{/privacy}","received_events_url":"https://api.github.com/users/OopsOutOfMemory/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OopsOutOfMemory/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/OopsOutOfMemory/spark","forks_url":"https://api.github.com/repos/OopsOutOfMemory/spark/forks","keys_url":"https://api.github.com/repos/OopsOutOfMemory/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OopsOutOfMemory/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OopsOutOfMemory/spark/teams","hooks_url":"https://api.github.com/repos/OopsOutOfMemory/spark/hooks","issue_events_url":"https://api.github.com/repos/OopsOutOfMemory/spark/issues/events{/number}","events_url":"https://api.github.com/repos/OopsOutOfMemory/spark/events","assignees_url":"https://api.github.com/repos/OopsOutOfMemory/spark/assignees{/user}","branches_url":"https://api.github.com/repos/OopsOutOfMemory/spark/branches{/branch}","tags_url":"https://api.github.com/repos/OopsOutOfMemory/spark/tags","blobs_url":"https://api.github.com/repos/OopsOutOfMemory/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OopsOutOfMemory/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OopsOutOfMemory/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/OopsOutOfMemory/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OopsOutOfMemory/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/OopsOutOfMemory/spark/languages","stargazers_url":"https://api.github.com/repos/OopsOutOfMemory/spark/stargazers","contributors_url":"https://api.github.com/repos/OopsOutOfMemory/spark/contributors","subscribers_url":"https://api.github.com/repos/OopsOutOfMemory/spark/subscribers","subscription_url":"https://api.github.com/repos/OopsOutOfMemory/spark/subscription","commits_url":"https://api.github.com/repos/OopsOutOfMemory/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/OopsOutOfMemory/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/OopsOutOfMemory/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/OopsOutOfMemory/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/OopsOutOfMemory/spark/contents/{+path}","compare_url":"https://api.github.com/repos/OopsOutOfMemory/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OopsOutOfMemory/spark/merges","archive_url":"https://api.github.com/repos/OopsOutOfMemory/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OopsOutOfMemory/spark/downloads","issues_url":"https://api.github.com/repos/OopsOutOfMemory/spark/issues{/number}","pulls_url":"https://api.github.com/repos/OopsOutOfMemory/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/OopsOutOfMemory/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/OopsOutOfMemory/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OopsOutOfMemory/spark/labels{/name}","releases_url":"https://api.github.com/repos/OopsOutOfMemory/spark/releases{/id}","created_at":"2014-10-26T16:16:19Z","updated_at":"2015-05-04T06:41:48Z","pushed_at":"2015-06-12T06:55:37Z","git_url":"git://github.com/OopsOutOfMemory/spark.git","ssh_url":"git@github.com:OopsOutOfMemory/spark.git","clone_url":"https://github.com/OopsOutOfMemory/spark.git","svn_url":"https://github.com/OopsOutOfMemory/spark","homepage":null,"size":115215,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"e428b3a951377d47aa80d5f26d6bab979e72e8ab","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}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-06-17T19:53:43Z","pushed_at":"2015-06-17T20:38:13Z","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":1462008,"stargazers_count":4414,"watchers_count":4414,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3883,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":365,"forks":3883,"open_issues":365,"watchers":4414,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/6551"},"html":{"href":"https://github.com/apache/spark/pull/6551"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/6551"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/6551/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/6551/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/6551/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/7a209d7d02af0fc6427a967ac35145bc5e3e3383"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":20,"review_comments":17,"commits":6,"additions":27,"deletions":3,"changed_files":2}}