{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/7056","labels_url":"https://api.github.com/repos/apache/spark/issues/7056/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/7056/comments","events_url":"https://api.github.com/repos/apache/spark/issues/7056/events","html_url":"https://github.com/apache/spark/pull/7056","id":91445113,"number":7056,"title":"[SPARK-8677][SQL] Fix non-terminating decimal expansion for decimal divide operation","user":{"login":"viirya","id":68855,"avatar_url":"https://avatars.githubusercontent.com/u/68855?v=3","gravatar_id":"","url":"https://api.github.com/users/viirya","html_url":"https://github.com/viirya","followers_url":"https://api.github.com/users/viirya/followers","following_url":"https://api.github.com/users/viirya/following{/other_user}","gists_url":"https://api.github.com/users/viirya/gists{/gist_id}","starred_url":"https://api.github.com/users/viirya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viirya/subscriptions","organizations_url":"https://api.github.com/users/viirya/orgs","repos_url":"https://api.github.com/users/viirya/repos","events_url":"https://api.github.com/users/viirya/events{/privacy}","received_events_url":"https://api.github.com/users/viirya/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-27T10:44:53Z","updated_at":"2015-07-02T21:19:32Z","closed_at":"2015-06-28T21:49:59Z","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/7056","html_url":"https://github.com/apache/spark/pull/7056","diff_url":"https://github.com/apache/spark/pull/7056.diff","patch_url":"https://github.com/apache/spark/pull/7056.patch"},"body":"JIRA: https://issues.apache.org/jira/browse/SPARK-8677"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/118171474","html_url":"https://github.com/apache/spark/pull/7056#issuecomment-118171474","issue_url":"https://api.github.com/repos/apache/spark/issues/7056","id":118171474,"user":{"login":"JihongMA","id":7254535,"avatar_url":"https://avatars.githubusercontent.com/u/7254535?v=3","gravatar_id":"","url":"https://api.github.com/users/JihongMA","html_url":"https://github.com/JihongMA","followers_url":"https://api.github.com/users/JihongMA/followers","following_url":"https://api.github.com/users/JihongMA/following{/other_user}","gists_url":"https://api.github.com/users/JihongMA/gists{/gist_id}","starred_url":"https://api.github.com/users/JihongMA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JihongMA/subscriptions","organizations_url":"https://api.github.com/users/JihongMA/orgs","repos_url":"https://api.github.com/users/JihongMA/repos","events_url":"https://api.github.com/users/JihongMA/events{/privacy}","received_events_url":"https://api.github.com/users/JihongMA/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T21:19:31Z","updated_at":"2015-07-02T21:19:31Z","body":"@viirya  I have opened a JIRA https://issues.apache.org/jira/browse/SPARK-8800, and have put more detailed specification I found how to handle decimal division in the case of Decimal.Unlimited type.   I propose we should return exact result whenever possible,  in the case of infinite long precision/scale case, fall back to the limit 38 or whatever as what hive has done. \r\n\r\nhere is another example where we should return 0.125 instead of 0\r\n\r\nscala> val aa = Decimal(1) /Decimal(8)\r\naa: org.apache.spark.sql.types.Decimal = 0\r\n"}}