hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Makoto Yui (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVEMALL-72) Fix rescale UDF behavior to return range [0.0,1.0]
Date Thu, 16 Feb 2017 06:32:41 GMT
Makoto Yui created HIVEMALL-72:
----------------------------------

             Summary: 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


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)

Mime
View raw message