blob: 5c19730a79504b379069bd4ebe4fa34f1584db76 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse test if exists;
vinayakb38b7ca42012-03-05 05:44:15 +00002create dataverse test;
3use dataverse test;
4
5create type LineIDType as closed {
6 l_orderkey: int32,
7 l_linenumber: int32,
8 l_suppkey: int32
9}
10
vinayakb38b7ca42012-03-05 05:44:15 +000011create dataset LineID(LineIDType)
khfaraaz82@gmail.com502731f2012-05-02 20:38:16 +000012 partitioned by key l_orderkey, l_linenumber;
vinayakb38b7ca42012-03-05 05:44:15 +000013
vinayakb38b7ca42012-03-05 05:44:15 +000014insert into dataset LineID (
15let $x:=1
16let $y:=2
17let $z:=3
18return {
19 "l_orderkey": $x,
20 "l_partkey": $y,
21 "l_suppkey": $z
22}
23);
24
25insert into dataset LineID (
26let $x:=2
27let $y:=3
28let $z:=4
29return {
30 "l_orderkey": $x,
31 "l_partkey": $y,
32 "l_suppkey": $z
33}
34);
35
alexander.behma098ddb2012-05-03 02:07:46 +000036write output to nc1:"rttest/dml_insert-into-empty-dataset.adm";
vinayakb38b7ca42012-03-05 05:44:15 +000037for $c in dataset('LineID')
38where $c.l_suppkey < 100 and $c.l_linenumber<5
39order by $c.l_orderkey, $c.l_linenumber
40return $c