tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jihoon Son (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAJO-344) Tajo cannot recognize negative numeric expressions
Date Sun, 08 Dec 2013 06:31:39 GMT

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

Jihoon Son commented on TAJO-344:
---------------------------------

Overall, this patch looks good to me.
But, I have a question for the round function.
You use Math.ceil() and Math.floor() for negative and positive values, respectively.
However, it looks to return the same results with Math.round() as follows.
{noformat}
Math.round(10.3d) => 10
Math.round(10.7d) => 11
Math.round(-10.7d) => -11
Math.round(-10.3d) => -10

Tajo.round(10.3d) => 10
Tajo.round(10.7d) => 11
Tajo.round(-10.7d) => -11
Tajo.round(-10.3d) => -10
(The Tajo.round() function means that the Round() function of Tajo.)
{noformat}

Do you have any reasons to use the above two functions instead of just using Math.round()?

Also, the patch causes a Hunk while applying it.

> Tajo cannot recognize negative numeric expressions
> --------------------------------------------------
>
>                 Key: TAJO-344
>                 URL: https://issues.apache.org/jira/browse/TAJO-344
>             Project: Tajo
>          Issue Type: Bug
>          Components: operator/function/udf, parser, planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.8-incubating
>
>         Attachments: TAJO-344.patch
>
>
> The parser cannot deal with negative numeric values. You can reproduce the problem as
follows:
> {code}
> select -1;
> {code}
> We have to fix it.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message