blob: e0a16a12413490362b0961ac98ee2af4da4e017b [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
2 * Description : Create UDF and invoke in the WHERE clause of FLWOR expression
3 * Expected Res : Success
4 * Date : Sep 5th 2012
5 */
6
7
8drop dataverse test if exists;
9create dataverse test;
10
RamanGrover29@gmail.com24710392012-11-11 18:57:42 +000011write output to nc1:"rttest/user-defined-functions_udf20.adm";
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +000012
13create function test.pie(){
143.14
15}
16
17create function test.area($radius){
18test.pie() * $radius * $radius
19}
20
21for $a in [2,4,6,8,10,12]
22where test.area($a) > 100
23return { "radius" : $a,"area" : test.area($a) }