blob: 2605f7a39cced84dd8b0ada22e8339eedb99392c [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
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
7drop dataverse test if exists;
8create dataverse test;
9
RamanGrover29@gmail.com24710392012-11-11 18:57:42 +000010write output to nc1:"rttest/user-defined-functions_udf02.adm";
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +000011
12create function test.getFirst($list){
13$list[0]
14}
15
16for $a in [[1,2],[3,4]]
17return test.getFirst($a)