You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "John Sichi (JIRA)" <ji...@apache.org> on 2010/11/05 22:50:42 UTC

[jira] Created: (HIVE-1771) ROUND(infinity) chokes

ROUND(infinity) chokes
----------------------

                 Key: HIVE-1771
                 URL: https://issues.apache.org/jira/browse/HIVE-1771
             Project: Hive
          Issue Type: Bug
          Components: UDF
    Affects Versions: 0.6.0
            Reporter: John Sichi
            Assignee: John Sichi
             Fix For: 0.7.0


Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).

In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1771) ROUND(infinity) chokes

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namit Jain updated HIVE-1771:
-----------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed. Thanks John

> ROUND(infinity) chokes
> ----------------------
>
>                 Key: HIVE-1771
>                 URL: https://issues.apache.org/jira/browse/HIVE-1771
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>         Attachments: HIVE-1771.1.patch
>
>
> Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).
> In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1771) ROUND(infinity) chokes

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Sichi updated HIVE-1771:
-----------------------------

    Attachment: HIVE-1771.1.patch

This patch fixes the two-arg version, but leaves the one-arg version as is.

> ROUND(infinity) chokes
> ----------------------
>
>                 Key: HIVE-1771
>                 URL: https://issues.apache.org/jira/browse/HIVE-1771
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>         Attachments: HIVE-1771.1.patch
>
>
> Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).
> In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1771) ROUND(infinity) chokes

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930296#action_12930296 ] 

Namit Jain commented on HIVE-1771:
----------------------------------

+1

> ROUND(infinity) chokes
> ----------------------
>
>                 Key: HIVE-1771
>                 URL: https://issues.apache.org/jira/browse/HIVE-1771
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>         Attachments: HIVE-1771.1.patch
>
>
> Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).
> In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1771) ROUND(infinity) chokes

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928838#action_12928838 ] 

John Sichi commented on HIVE-1771:
----------------------------------

Example of error currently given.

Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.io.LongWritable org.apache.hadoop.hive.ql.udf.UDFRound.evaluate(org.apache.hadoop.hive.serde2.io.DoubleWritable)
on object org.apache.hadoop.hive.ql.udf.UDFRound@7817bcd4 of class org.apache.hadoop.hive.ql.udf.UDFRound with arguments {Infinity:org.apache.hadoop.hive.serde2.io.DoubleWritable} of size 1

Note that MySQL ROUND doesn't have this problem since it makes the return type match the arg type.


> ROUND(infinity) chokes
> ----------------------
>
>                 Key: HIVE-1771
>                 URL: https://issues.apache.org/jira/browse/HIVE-1771
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>
> Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).
> In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HIVE-1771) ROUND(infinity) chokes

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Sichi updated HIVE-1771:
-----------------------------

    Status: Patch Available  (was: Open)

> ROUND(infinity) chokes
> ----------------------
>
>                 Key: HIVE-1771
>                 URL: https://issues.apache.org/jira/browse/HIVE-1771
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>         Attachments: HIVE-1771.1.patch
>
>
> Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).
> In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1771) ROUND(infinity) chokes

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929887#action_12929887 ] 

John Sichi commented on HIVE-1771:
----------------------------------

https://reviews.apache.org/r/53/diff/#index_header

> ROUND(infinity) chokes
> ----------------------
>
>                 Key: HIVE-1771
>                 URL: https://issues.apache.org/jira/browse/HIVE-1771
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: John Sichi
>             Fix For: 0.7.0
>
>         Attachments: HIVE-1771.1.patch
>
>
> Since 1-arg ROUND returns an integer, it's hard to fix this without either losing data (return NULL) or making a backwards-incompatible change (return DOUBLE instead of BIGINT).
> In any case, we should definitely fix 2-arg ROUND to preserve infinity/NaN/etc, since it is already returning double.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.