Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

[HIVEMALL-71] Handle null values and add a unit Tests to RescaleUDF. #45

Closed
wants to merge 2 commits into from
Closed

[HIVEMALL-71] Handle null values and add a unit Tests to RescaleUDF. #45

wants to merge 2 commits into from

Conversation

wangyum
Copy link
Member

@wangyum wangyum commented Feb 13, 2017

What changes were proposed in this pull request?

Handle null values and add a unit Tests to RescaleUDF.

What type of PR is it?

Improvement

What is the Jira issue?

https://issues.apache.org/jira/browse/HIVEMALL-71

How was this patch tested?

unit tests

@coveralls
Copy link

coveralls commented Feb 13, 2017

Coverage Status

Coverage increased (+0.1%) to 35.914% when pulling 464e7db on wangyum:HIVEMALL-71 into 6b462ae on apache:master.

@myui
Copy link
Member

myui commented Feb 14, 2017

Thanks, I will take this PR on.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 36.222% when pulling 661571d on wangyum:HIVEMALL-71 into 6b462ae on apache:master.

@coveralls
Copy link

coveralls commented Feb 14, 2017

Coverage Status

Coverage increased (+0.1%) to 35.923% when pulling 661571d on wangyum:HIVEMALL-71 into 6b462ae on apache:master.

@asfgit asfgit closed this in bcae153 Feb 16, 2017
@myui
Copy link
Member

myui commented Feb 16, 2017

@wangyum Thanks. Merged with some modifications.

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(1.0 as double) as min, cast(10.0 as float) as max
) t;

0.022222228
NULL
0.022222228
NULL
0.022222228

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants