RamanGrover29@gmail.com | 58cf330 | 2012-11-09 00:27:45 +0000 | [diff] [blame] | 1 | /* |
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 | |||||
9 | drop dataverse test if exists; | ||||
10 | create dataverse test; | ||||
11 | |||||
12 | write output to nc1:"rttest/cross-dataverse_udf25.adm"; | ||||
13 | |||||
14 | create function test.computeBonus($pbcRating,$salary) | ||||
15 | { | ||||
16 | if ($pbcRating = 1) then | ||||
17 | $salary * 0.25 | ||||
18 | else | ||||
19 | $salary * 0.10 | ||||
20 | } | ||||
21 | |||||
22 | test.computeBonus(-1,-1) | ||||
23 |