{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14036","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14036/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14036/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14036/events","html_url":"https://github.com/apache/spark/pull/14036","id":163553791,"number":14036,"title":"[SPARK-16323] [SQL] Add IntegerDivide to avoid unnecessary cast","user":{"login":"techaddict","id":1378755,"avatar_url":"https://avatars.githubusercontent.com/u/1378755?v=3","gravatar_id":"","url":"https://api.github.com/users/techaddict","html_url":"https://github.com/techaddict","followers_url":"https://api.github.com/users/techaddict/followers","following_url":"https://api.github.com/users/techaddict/following{/other_user}","gists_url":"https://api.github.com/users/techaddict/gists{/gist_id}","starred_url":"https://api.github.com/users/techaddict/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techaddict/subscriptions","organizations_url":"https://api.github.com/users/techaddict/orgs","repos_url":"https://api.github.com/users/techaddict/repos","events_url":"https://api.github.com/users/techaddict/events{/privacy}","received_events_url":"https://api.github.com/users/techaddict/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-07-03T09:03:29Z","updated_at":"2016-07-12T16:43:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14036","html_url":"https://github.com/apache/spark/pull/14036","diff_url":"https://github.com/apache/spark/pull/14036.diff","patch_url":"https://github.com/apache/spark/pull/14036.patch"},"body":"## What changes were proposed in this pull request?\r\nAdd IntegerDivide to avoid unnecessary cast\r\n\r\nBefore:\r\n```\r\nscala> spark.sql(\"select 6 div 3\").explain(true)\r\n...\r\n== Analyzed Logical Plan ==\r\nCAST((6 / 3) AS BIGINT): bigint\r\nProject [cast((cast(6 as double) / cast(3 as double)) as bigint) AS\r\nCAST((6 / 3) AS BIGINT)#5L]\r\n+- OneRowRelation$\r\n...\r\n```\r\n\r\nAfter:\r\n```\r\nscala> spark.sql(\"select 6 div 3\").explain(true)\r\n...\r\n== Analyzed Logical Plan ==\r\n(6 / 3): int\r\nProject [(6 / 3) AS (6 / 3)#11]\r\n+- OneRowRelation$\r\n...\r\n```\r\n\r\n## How was this patch tested?\r\nExisting Tests and added new ones"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/232102231","html_url":"https://github.com/apache/spark/pull/14036#issuecomment-232102231","issue_url":"https://api.github.com/repos/apache/spark/issues/14036","id":232102231,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T16:33:18Z","updated_at":"2016-07-12T16:33:18Z","body":"**[Test build #62177 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62177/consoleFull)** for PR 14036 at commit [`dabaadb`](https://github.com/apache/spark/commit/dabaadb29e17a55b15e8d7399fac6a32af158ef9)."}}
{"actor":{"display_login":"SparkQA"}}