blob: 2f7b83ef89a618ab51dd1782e5820fcbf3bf3416 [file] [log] [blame]
/*
* Testcase Name : matches05.aql
* Description : Positive tests
* : Create two internal datasets and insert string data and perform match of fname using matches function.
* Success : Yes
* Date : 25th April 2012
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type TestType1 as{
fname:string,
lname:string,
id:int32
}
create dataset testds1(TestType1) partitioned by key id;
insert into dataset testds1({"fname":"Test","lname":"Test","id":123});
insert into dataset testds1({"fname":"Testa","lname":"Test","id":124});
insert into dataset testds1({"fname":"Test1","lname":"Test1","id":125});
insert into dataset testds1({"fname":"Test","lname":"Testb","id":126});
insert into dataset testds1({"fname":"Test2","lname":"Test2","id":127});
write output to nc1:"rttest/string_matches05.adm";
//Perform the match for fname and lname
for $l in dataset('testds1')
order by $l.id
where matches($l.fname,$l.lname)
return $l