[ 
https://issues.apache.org/jira/browse/TAJO-979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14077324#comment-14077324
 ] 

Hyunsik Choi edited comment on TAJO-979 at 7/29/14 3:01 AM:
------------------------------------------------------------

In my view, most of uses may not want to abort queries which faces 'divide by 
zero'. Of course, it can be avoided if users use conditional expression like 
CASE WHEN. However, It does not make sense to force users to make use of some 
condition expression for all divide expressions. So, 'divide by zero' exception 
should return NULL.

In addition, we can show some warning about how many 'divide by zero' occurs. 
Also, we could add some session variable to control query behavior to abort or 
ignore.


was (Author: hyunsik):
In my view, most of uses may not want to abort queries which faces 'divide by 
zero'. Of course, it can be avoided if users use conditional expression like 
CASE WHEN. However, It does not make sense to force users to make use of some 
condition expression for all divide expressions. divide by zero exception 
should return NULL.

In addition, we can show some warning about how many 'divide by zero' occurs. 
Also, we could add some session variable to control query behavior to abort or 
ignore.

> Dividing float value by zero should throw "Divide by zero Exception"
> --------------------------------------------------------------------
>
>                 Key: TAJO-979
>                 URL: https://issues.apache.org/jira/browse/TAJO-979
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Hyoungjun Kim
>            Priority: Critical
>
> See the title. Currently Tajo returns "Infinity".
> This is a result of Tajo.
> {noformat}
> default> select 10.0/0;
> ?divide
> -------------------------------
> Infinity
> (1 rows, 0.003 sec, 0 B selected)
> default> select 10/0;
> ERROR: / by zero
> {noformat}
> This is a result of Postgresql. 
> {noformat}
> babokim=# select 10.0/0.0;
> ERROR:  division by zero
> babokim=# select 10.0/0;
> ERROR:  division by zero
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to