blob: fefc07e497109f550e5ca910755dac08aeed6640 [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
2 * Description : Create UDF and invoke with negative inputs.
3 * Expected Res : Failure
4 * Date : 5th Sep 2012
5 */
6
7// This one returns NPE...
8
9drop dataverse test if exists;
10create dataverse test;
11
RamanGrover29@gmail.com24710392012-11-11 18:57:42 +000012write output to nc1:"rttest/user-defined-functions_udf25.adm";
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +000013
14create function test.computeBonus($pbcRating,$salary)
15{
16 if ($pbcRating = 1) then
17 $salary * 0.25
18 else
19 $salary * 0.10
20}
21
22test.computeBonus(-1,-1)
23