[jira] [Commented] (SPARK-21630) Pmod should not throw a divide by zero exception

2017-08-04 Thread Herman van Hovell (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-21630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16114078#comment-16114078
 ] 

Herman van Hovell commented on SPARK-21630:
---

Yeah it is. Thanks for pointing this out.

> Pmod should not throw a divide by zero exception
> 
>
> Key: SPARK-21630
> URL: https://issues.apache.org/jira/browse/SPARK-21630
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.0.2, 2.1.1, 2.2.0
>Reporter: Herman van Hovell
>
> Pmod currently throws a divide by zero exception when the right input is 0. 
> It should - like Divide or Remainder - probably return null.
> Here is a small reproducer:
> {noformat}
> scala> sql("select pmod(id, 0) from range(10)").show
> 17/08/03 22:36:43 ERROR Executor: Exception in task 0.0 in stage 3.0 (TID 3)
> java.lang.ArithmeticException: / by zero
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-21630) Pmod should not throw a divide by zero exception

2017-08-03 Thread Liang-Chi Hsieh (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-21630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113777#comment-16113777
 ] 

Liang-Chi Hsieh commented on SPARK-21630:
-

Maybe duplicate to SPARK-21205?

> Pmod should not throw a divide by zero exception
> 
>
> Key: SPARK-21630
> URL: https://issues.apache.org/jira/browse/SPARK-21630
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 2.0.2, 2.1.1, 2.2.0
>Reporter: Herman van Hovell
>
> Pmod currently throws a divide by zero exception when the right input is 0. 
> It should - like Divide or Remainder - probably return null.
> Here is a small reproducer:
> {noformat}
> scala> sql("select pmod(id, 0) from range(10)").show
> 17/08/03 22:36:43 ERROR Executor: Exception in task 0.0 in stage 3.0 (TID 3)
> java.lang.ArithmeticException: / by zero
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org