Github user myui commented on the issue:

    https://github.com/apache/incubator-hivemall/pull/45
  
    @wangyum Thanks. Merged with some modifications.
    
    ```sql
    select rescale(v,min,max) from (
        select cast(1.2 as float) as v, 1.0 as min, 10.0 as max
        union all
        select cast(null as float) as v, 1.0 as min, 10.0 as max
        union all
        select cast(1.2 as double) as v, 1.0 as min, 10.0 as max
        union all
        select cast(null as double) as v, 1.0 as min, 10.0 as max
        union all
        select cast(1.2 as double) as v, cast(5.0 as double) as min, cast(10.0 
as float) as max
    ) t;
    
    0.022222228
    NULL
    0.022222228
    NULL
    -0.76
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to