blob: 00b60cb31d8441fd35c8e88a9683359e1c28d6cb [file] [log] [blame]
/*
* Test case Name : insert-into-empty-dataset-with-index.aql
* Description : Check that we can insert into an empty dataset and its empty secondary indexes
* Expected Result : Success
* Date : May 2 2012
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type LineIDType as closed {
l_orderkey: int32,
l_linenumber: int32,
l_suppkey: int32
}
create dataset LineID(LineIDType)
partitioned by key l_orderkey, l_linenumber;
create index idx_LineID_partkey on LineID(l_linenumber);
create index idx_LineID_suppkey on LineID(l_suppkey);
insert into dataset LineID (
let $x:=1
let $y:=2
let $z:=3
return {
"l_orderkey": $x,
"l_linenumber": $y,
"l_suppkey": $z
}
);
insert into dataset LineID (
let $x:=2
let $y:=3
let $z:=4
return {
"l_orderkey": $x,
"l_linenumber": $y,
"l_suppkey": $z
}
);
write output to nc1:"rttest/dml_insert-into-empty-dataset-with-index.adm";
for $c in dataset('LineID')
where $c.l_suppkey < 100 and $c.l_linenumber<5
order by $c.l_orderkey, $c.l_linenumber
return $c