/* | |
* Description : Create UDF and invoke with negative inputs. | |
* Expected Res : Failure | |
* Date : 5th Sep 2012 | |
*/ | |
// This one returns NPE... | |
drop dataverse test if exists; | |
create dataverse test; | |
write output to nc1:"rttest/cross-dataverse_udf25.adm"; | |
create function test.computeBonus($pbcRating,$salary) | |
{ | |
if ($pbcRating = 1) then | |
$salary * 0.25 | |
else | |
$salary * 0.10 | |
} | |
test.computeBonus(-1,-1) | |