RamanGrover29@gmail.com | 58cf330 | 2012-11-09 00:27:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Description : Create user defined functions using fully qualified names |
| 3 | * : verify their details in Function dataset in Metadata dataverse. |
| 4 | * Expected Res : |
| 5 | * Date : 30th Aug 2012 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse testdv1 if exists; |
| 9 | create dataverse testdv1; |
| 10 | |
| 11 | write output to nc1:"rttest/cross-dataverse_cross-dv15.adm"; |
| 12 | |
| 13 | // UDF with no inputs |
| 14 | create function testdv1.fun01(){ |
| 15 | 100 |
| 16 | } |
| 17 | |
| 18 | // UDF with one input |
| 19 | create function testdv1.fun02($a){ |
| 20 | "function 02" |
| 21 | } |
| 22 | |
| 23 | // UDF with two inputs |
| 24 | create function testdv1.fun03($b,$c){ |
| 25 | $b+$c |
| 26 | } |
| 27 | |
| 28 | for $l in dataset('Metadata.Function') |
| 29 | where $l.DataverseName='testdv1' |
| 30 | return $l; |