GitHub user adrian-wang opened a pull request: https://github.com/apache/spark/pull/3443
[SPARK-4593] [SQL] return null when divider is 0 of Double type SELECT max(1/0) FROM src would return a very large number, which is obviously not right. For hive-0.12, hive would return `Infinity` for 1/0, while for hive-0.13.1, it is `NULL` for 1/0. I think it is better to keep our behavior with newer Hive version. This PR ensures that when the divider is 0, the result of expression should be NULL, same with hive-0.13.1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/adrian-wang/spark div Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/3443.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3443 ---- commit 2dfe50f607a6dced1554d07daa3a8d2e9664ffa9 Author: Daoyuan Wang <daoyuan.w...@intel.com> Date: 2014-11-25T05:54:34Z return null when divider is 0 of Double type ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org