blob: 90d4cb994fc8205c2d74c20c2e0f427e74e05c5b [file] [log] [blame]
/*
* Description : Test that BTree index is used in query plan
* : define the BTree index on a composite key (fname,lanme)
* : predicate => where $l.fname > "Julio" and $l.lname > "Mattocks" and
* $l.fname <= "Micco" and $l.lname < "Vangieson"
* Expected Result : Success
* Issue : Issue 174
* Date : 5th Feb, 2013
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type Emp as closed {
id:int32,
fname:string,
lname:string,
age:int32,
dept:string
}
create dataset employee(Emp) primary key id;
load dataset employee
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/names.adm"),("format"="delimited-text"),("delimiter"="|"));
create index idx_employee_f_l_name on employee(fname,lname);
write output to nc1:"rttest/index-selection_btree-index-composite-key-mixed-intervals.adm";
for $l in dataset('employee')
where $l.fname > "Julio" and $l.lname > "Mattocks" and $l.fname <= "Micco" and $l.lname < "Vangieson"
order by $l.id
return $l