jarodwen | cbbab14 | 2013-02-01 07:56:46 +0000 | [diff] [blame] | 1 | /* |
2 | * Description : Pass an ordered list as input to UDF and return the zeroth element of that list. | ||||
3 | * Expected Res : Success | ||||
4 | * Date : 4th September 2012 | ||||
5 | */ | ||||
6 | |||||
7 | drop dataverse test if exists; | ||||
8 | create dataverse test; | ||||
9 | |||||
10 | write output to nc1:"rttest/user-defined-functions_udf02.adm"; | ||||
11 | |||||
12 | create function test.getFirst($list){ | ||||
13 | $list[0] | ||||
14 | } | ||||
15 | |||||
16 | for $a in [[1,2],[3,4]] | ||||
17 | return test.getFirst($a) |