{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/79788242","id":79788242,"diff_hunk":"@@ -170,11 +170,9 @@ class ArithmeticExpressionSuite extends SparkFunSuite with ExpressionEvalHelper\n     checkEvaluation(Remainder(positiveLongLit, positiveLongLit), 0L)\n     checkEvaluation(Remainder(negativeLongLit, negativeLongLit), 0L)\n \n-    // TODO: the following lines would fail the test due to inconsistency result of interpret","path":"sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala","position":4,"original_position":4,"commit_id":"6f91656db006647705f86b5eef7e3d02727b99a4","original_commit_id":"6f91656db006647705f86b5eef7e3d02727b99a4","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"body":"nvm, it's fixed in https://github.com/apache/spark/pull/15171","created_at":"2016-09-21T08:58:49Z","updated_at":"2016-09-21T08:58:50Z","html_url":"https://github.com/apache/spark/pull/15059#discussion_r79788242","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/15059","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/79788242"},"html":{"href":"https://github.com/apache/spark/pull/15059#discussion_r79788242"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/15059"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15059","id":84894281,"html_url":"https://github.com/apache/spark/pull/15059","diff_url":"https://github.com/apache/spark/pull/15059.diff","patch_url":"https://github.com/apache/spark/pull/15059.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/15059","number":15059,"state":"closed","locked":false,"title":"[SPARK-17506][SQL] Improve the check double values equality rule.","user":{"login":"jiangxb1987","id":4784782,"avatar_url":"https://avatars.githubusercontent.com/u/4784782?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangxb1987","html_url":"https://github.com/jiangxb1987","followers_url":"https://api.github.com/users/jiangxb1987/followers","following_url":"https://api.github.com/users/jiangxb1987/following{/other_user}","gists_url":"https://api.github.com/users/jiangxb1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangxb1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangxb1987/subscriptions","organizations_url":"https://api.github.com/users/jiangxb1987/orgs","repos_url":"https://api.github.com/users/jiangxb1987/repos","events_url":"https://api.github.com/users/jiangxb1987/events{/privacy}","received_events_url":"https://api.github.com/users/jiangxb1987/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nIn `ExpressionEvalHelper`, we check the equality between two double values by comparing whether the expected value is within the range [target - tolerance, target + tolerance], but this can cause a negative false when the compared numerics are very large. \r\nBefore：\r\n```\r\nval1 = 1.6358558070241E306\r\nval2 = 1.6358558070240974E306\r\nExpressionEvalHelper.compareResults(val1, val2)\r\nfalse\r\n```\r\nIn fact, `val1` and `val2` are but with different precisions, we should tolerant this case by comparing with percentage range, eg.,expected is within range [target - target * tolerance_percentage, target + target * tolerance_percentage].\r\nAfter:\r\n```\r\nval1 = 1.6358558070241E306\r\nval2 = 1.6358558070240974E306\r\nExpressionEvalHelper.compareResults(val1, val2)\r\ntrue\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nExsiting testcases.","created_at":"2016-09-12T15:40:38Z","updated_at":"2016-09-21T08:58:50Z","closed_at":"2016-09-18T15:06:49Z","merged_at":null,"merge_commit_sha":"d3ee530ad930f629494de4b7249c3141d68fa973","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/15059/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/15059/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/15059/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/6f91656db006647705f86b5eef7e3d02727b99a4","head":{"label":"jiangxb1987:deq","ref":"deq","sha":"6f91656db006647705f86b5eef7e3d02727b99a4","user":{"login":"jiangxb1987","id":4784782,"avatar_url":"https://avatars.githubusercontent.com/u/4784782?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangxb1987","html_url":"https://github.com/jiangxb1987","followers_url":"https://api.github.com/users/jiangxb1987/followers","following_url":"https://api.github.com/users/jiangxb1987/following{/other_user}","gists_url":"https://api.github.com/users/jiangxb1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangxb1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangxb1987/subscriptions","organizations_url":"https://api.github.com/users/jiangxb1987/orgs","repos_url":"https://api.github.com/users/jiangxb1987/repos","events_url":"https://api.github.com/users/jiangxb1987/events{/privacy}","received_events_url":"https://api.github.com/users/jiangxb1987/received_events","type":"User","site_admin":false},"repo":{"id":35214686,"name":"spark","full_name":"jiangxb1987/spark","owner":{"login":"jiangxb1987","id":4784782,"avatar_url":"https://avatars.githubusercontent.com/u/4784782?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangxb1987","html_url":"https://github.com/jiangxb1987","followers_url":"https://api.github.com/users/jiangxb1987/followers","following_url":"https://api.github.com/users/jiangxb1987/following{/other_user}","gists_url":"https://api.github.com/users/jiangxb1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangxb1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangxb1987/subscriptions","organizations_url":"https://api.github.com/users/jiangxb1987/orgs","repos_url":"https://api.github.com/users/jiangxb1987/repos","events_url":"https://api.github.com/users/jiangxb1987/events{/privacy}","received_events_url":"https://api.github.com/users/jiangxb1987/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jiangxb1987/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/jiangxb1987/spark","forks_url":"https://api.github.com/repos/jiangxb1987/spark/forks","keys_url":"https://api.github.com/repos/jiangxb1987/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiangxb1987/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiangxb1987/spark/teams","hooks_url":"https://api.github.com/repos/jiangxb1987/spark/hooks","issue_events_url":"https://api.github.com/repos/jiangxb1987/spark/issues/events{/number}","events_url":"https://api.github.com/repos/jiangxb1987/spark/events","assignees_url":"https://api.github.com/repos/jiangxb1987/spark/assignees{/user}","branches_url":"https://api.github.com/repos/jiangxb1987/spark/branches{/branch}","tags_url":"https://api.github.com/repos/jiangxb1987/spark/tags","blobs_url":"https://api.github.com/repos/jiangxb1987/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiangxb1987/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiangxb1987/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiangxb1987/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiangxb1987/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/jiangxb1987/spark/languages","stargazers_url":"https://api.github.com/repos/jiangxb1987/spark/stargazers","contributors_url":"https://api.github.com/repos/jiangxb1987/spark/contributors","subscribers_url":"https://api.github.com/repos/jiangxb1987/spark/subscribers","subscription_url":"https://api.github.com/repos/jiangxb1987/spark/subscription","commits_url":"https://api.github.com/repos/jiangxb1987/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiangxb1987/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiangxb1987/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiangxb1987/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/jiangxb1987/spark/contents/{+path}","compare_url":"https://api.github.com/repos/jiangxb1987/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiangxb1987/spark/merges","archive_url":"https://api.github.com/repos/jiangxb1987/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiangxb1987/spark/downloads","issues_url":"https://api.github.com/repos/jiangxb1987/spark/issues{/number}","pulls_url":"https://api.github.com/repos/jiangxb1987/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/jiangxb1987/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/jiangxb1987/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiangxb1987/spark/labels{/name}","releases_url":"https://api.github.com/repos/jiangxb1987/spark/releases{/id}","deployments_url":"https://api.github.com/repos/jiangxb1987/spark/deployments","created_at":"2015-05-07T10:48:35Z","updated_at":"2016-04-06T08:58:13Z","pushed_at":"2016-09-14T10:45:13Z","git_url":"git://github.com/jiangxb1987/spark.git","ssh_url":"git@github.com:jiangxb1987/spark.git","clone_url":"https://github.com/jiangxb1987/spark.git","svn_url":"https://github.com/jiangxb1987/spark","homepage":null,"size":178942,"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":"8087ecf8daad1587d0ce9040991b14320628a65e","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-09-21T07:44:43Z","pushed_at":"2016-09-21T08:58:11Z","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":528048,"stargazers_count":10086,"watchers_count":10086,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9398,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":483,"forks":9398,"open_issues":483,"watchers":10086,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/15059"},"html":{"href":"https://github.com/apache/spark/pull/15059"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/15059"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/15059/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/15059/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/15059/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/6f91656db006647705f86b5eef7e3d02727b99a4"}}}}
{"actor":{"display_login":"cloud-fan"}}