[
https://issues.apache.org/jira/browse/TAJO-979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14079322#comment-14079322
]
Hyunsik Choi commented on TAJO-979:
-----------------------------------
You are right. I didn't expect the limitation in the current design of
TaskAttemptContext, Datum, and EvalNode. Currently, it is hard to implement
controllable behaviors of expression evaluations. Your suggestion using
ThreadLocal looks reasonable. BTW, it would be nice if we have more time to
think about the approach.
Now, If you are ok, we can choose the approach to return just NULL when divided
by zero exception occurs. Later, we can do controllable behaviors in additional
issues. As far as I know, Hive also returns NULL in the case. So, this choice
will satisfy many users who are familiar with Hive and Impala.
> 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
> Assignee: 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)