blob: 10985e36288346ce1f180f9d9054ff81c9bbaebf [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
2 * Description : Create two UDFs in two different dataverses and create datasets in tose dvs
3 * : access the datasets from the UDF defined in the other dataverse and invoke one of the UDF
4 * Expected Res : Success
5 * Date : Sep 7th 2012
6 */
7
8// dv1 - udf1 - dataset1
9// dv2 - udf2 - dataset2
10
11drop dataverse test if exists;
12drop dataverse fest if exists;
13
14create dataverse test;
15create dataverse fest;
16
17create type test.testtype as open {
18id : int32
19}
20
21create type fest.testtype as open {
22id : int32
23}
24
25create dataset test.t1(testtype) partitioned by key id;
26create dataset fest.t1(testtype) partitioned by key id;
27
28insert into dataset test.t1({"id":24});
29insert into dataset test.t1({"id":23});
30insert into dataset test.t1({"id":21});
31insert into dataset test.t1({"id":44});
32insert into dataset test.t1({"id":64});
33
34insert into dataset fest.t1({"id":24});
35insert into dataset fest.t1({"id":23});
36insert into dataset fest.t1({"id":21});
37insert into dataset fest.t1({"id":44});
38insert into dataset fest.t1({"id":64});
39
40create function test.f1(){
41for $l in dataset('fest.t1')
42return $l
43}
44
45create function fest.f1(){
46for $m in dataset('test.t1')
47return $m
48}
49
50let $a := test.f1()
51let $b := fest.f1()
52return { "a" : $a, "b" : $b }