You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hivemall.apache.org by "Makoto Yui (JIRA)" <ji...@apache.org> on 2017/02/17 10:06:42 UTC

[jira] [Closed] (HIVEMALL-72) Fix rescale UDF behavior to return range [0.0,1.0]

     [ https://issues.apache.org/jira/browse/HIVEMALL-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Makoto Yui closed HIVEMALL-72.
------------------------------
    Resolution: Fixed

> Fix rescale UDF behavior to return range [0.0,1.0]
> --------------------------------------------------
>
>                 Key: HIVEMALL-72
>                 URL: https://issues.apache.org/jira/browse/HIVEMALL-72
>             Project: Hivemall
>          Issue Type: Bug
>            Reporter: Makoto Yui
>            Assignee: Makoto Yui
>            Priority: Minor
>              Labels: Bug
>
> rescale(value, min, max) should return min value when value is less than min.
> rescale(value, min, max) should return max value when value is greater than min.
> o Current behavior
> {code:sql}
> select rescale(4.2,1.0,3.0),rescale(-0.3, 1.0, 3.0);
> {code}
> > 1.5999999	-0.65
> o Expected behavior
> {code:sql}
> select rescale(4.2,1.0,3.0),rescale(-0.3, 1.0, 3.0);
> {code}
> > 1.0 3.0



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)