http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.1.ddl.aql new file mode 100644 index 0000000..90c2a6d --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.1.ddl.aql @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : This test case is to verify the fix for issue51 + : https://code.google.com/p/asterixdb/issues/detail?id=51 + * Expected Res : SUCCESS + * Date : 14th May 2013 + */ + +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type AddressType as open { + number: int64, + street: string, + city: string +} + +create type CustomerType as closed { + cid: int64, + name: string, + cashBack: int64, + age: int64?, + address: AddressType?, + lastorder: { + oid: int64, + total: float + } +} + + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Customers(CustomerType) +using localfs +(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm")); + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.2.update.aql new file mode 100644 index 0000000..b033546 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.2.update.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : This test case is to verify the fix for issue51 + : https://code.google.com/p/asterixdb/issues/detail?id=51 + * Expected Res : SUCCESS + * Date : 14th May 2013 + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.3.query.aql new file mode 100644 index 0000000..68a5dcc --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_04/join_q_04.3.query.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : This test case is to verify the fix for issue51 + : https://code.google.com/p/asterixdb/issues/detail?id=51 + * Expected Res : SUCCESS + * Date : 14th May 2013 + */ + +use dataverse test; + +for $c in dataset Customers +order by $c.name +return { + "cust_name": $c.name, + "order_ids": + for $o in dataset Orders + where $c.cid = $o.cid + order by $o.oid + return $o.oid +} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.1.ddl.aql new file mode 100644 index 0000000..dc7b178 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.1.ddl.aql @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type AddressType as open { + number: int64, + street: string, + city: string +} + +create type CustomerType as open { + cid: int64, + name: string, + age: int64?, + address: AddressType?, + lastorder: { + oid: int64, + total: float + } +} + +create dataset c1(CustomerType) + primary key cid; +create dataset c2(CustomerType) + primary key cid; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.2.update.aql new file mode 100644 index 0000000..b658942 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.2.update.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +load dataset c1 +using localfs +(("path"="asterix_nc1://data/custord-tiny/customer-tiny.adm"),("format"="adm")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.3.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.3.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.3.update.aql new file mode 100644 index 0000000..d5f2e33 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.3.update.aql @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +insert into dataset c2 ( + + for $c in dataset('c1') + return $c + +); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.4.query.aql new file mode 100644 index 0000000..69b934e --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/load-test/load-test.4.query.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $c in dataset('c2') +order by $c.cid +return $c http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.1.ddl.aql new file mode 100644 index 0000000..f9209b2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.3.query.aql new file mode 100644 index 0000000..e659f22 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_01/order_q_01.3.query.aql @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $c in dataset('Orders') +return $c http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.1.ddl.aql new file mode 100644 index 0000000..f9209b2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.3.query.aql new file mode 100644 index 0000000..a9c232f --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_02/order_q_02.3.query.aql @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $o in dataset('Orders') +let $c1 := [ $o.orderstatus, $o.clerk] +let $c2 := {{ $o.orderstatus, $o.clerk}} +let $c3 := [$o.heList, $o.openlist, $o.loc, $o.line, $o.poly, $o.lastorder] +let $c4 := [$o.heList, $o.openlist, $o.loc, $o.line, $o.poly, $o.lastorder] +return { "id": $o.cid, "list1":$c1, "list2":$c2,"list3":$c3,"list4":$c4} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.1.ddl.aql new file mode 100644 index 0000000..f9209b2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.3.query.aql new file mode 100644 index 0000000..43fd78b --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_03/order_q_03.3.query.aql @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $o in dataset('Orders') +let $c1 := [ $o.orderstatus, $o.clerk] +let $c2 := {{ $o.orderstatus, $o.clerk}} +let $c3 := [$o.heList, $o.openlist, $o.loc, $o.line, $o.poly, $o.lastorder] +let $c4 := [$o.heList, $o.openlist, $o.loc, $o.line, $o.poly, $o.lastorder] +return { "orderid": $o.oid, "ordertot":$o.total, "list": $c1, "item1": $c1[0], "item2": $c1[1], "item3": $c1[2]} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.1.ddl.aql new file mode 100644 index 0000000..f9209b2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.3.query.aql new file mode 100644 index 0000000..fe81547 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_04/order_q_04.3.query.aql @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $o in dataset('Orders') +let $c1 := [ $o.orderstatus, $o.clerk] +let $c2 := {{ $o.orderstatus, $o.clerk}} +let $c3 := [$o.heList, $o.openlist, $o.loc, $o.line, $o.poly, $o.lastorder] +let $c4 := [$o.heList, $o.openlist, $o.loc, $o.line, $o.poly, $o.lastorder] +return { "orderid": $o.oid, "ordertot":$o.total, "list": $c3, "item1": $c3[0], "item2": $c3[1], "item5": $c3[5], "item10": $c3[10]} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.1.ddl.aql new file mode 100644 index 0000000..f9209b2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.3.query.aql new file mode 100644 index 0000000..75038bc --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_05/order_q_05.3.query.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $o in dataset('Orders') +let $c1 := [] +let $c2 := {{}} +return { "orderid": $o.oid, "ordertot":$o.total, "emptyorderedlist": $c1, "emptyunorderedlist": $c2, "olist_item1": $c1[0], "olist_item5": $c1[4], "ulist_item1": $c2[?]} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.1.ddl.aql new file mode 100644 index 0000000..f9209b2 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; + +use dataverse test; + +create type OrderType as open { + oid: int64, + cid: int64, + orderstatus: string, + orderpriority: string, + clerk: string, + total: float, + items: [int64] +} + +create external dataset Orders(OrderType) +using localfs +(("path"="asterix_nc1://data/nontagged/orderData.json"),("format"="adm")); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.3.query.aql new file mode 100644 index 0000000..a19bc0e --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/order_q_06/order_q_06.3.query.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $o in dataset('Orders') +let $c3 := {{$o.heList, $o.openlist}} +return { "item1": $c3[?] } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.1.ddl.aql new file mode 100644 index 0000000..9552df3 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.1.ddl.aql @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; +use dataverse test; + +create type AddressType as closed { + street: string, + city: string, + zip: string, + latlong: point +} + +create type UserType as open { + name: string, + email: string, + interests: {{string}}, + address: AddressType, + member_of: {{ + { + sig_id: int64, + chapter_name: string, + member_since: date + } + }} +} + +create external dataset User(UserType) +using localfs +(("path"="asterix_nc1://data/events/tiny/user.adm"),("format"="adm")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.2.update.aql new file mode 100644 index 0000000..7cae9fa --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.2.update.aql @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +// no inserts, deletes http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.3.query.aql new file mode 100644 index 0000000..7a215d1 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q1/q1.3.query.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $user in dataset('User') +where some $i in $user.interests + satisfies $i = "movies" +return {"name": $user.name} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.1.ddl.aql new file mode 100644 index 0000000..8150528 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.1.ddl.aql @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; + +create dataverse test; +use dataverse test; + +create type AddressType as closed { + street: string, + city: string, + zip: string, + latlong: point +} + +create type EventType as closed { + event_id: int64, + name: string, + location: AddressType ?, + organizers: {{ + { + name: string + } + }}, + sponsoring_sigs: [ + { + sig_id: int64, + chapter_name: string + } + ], + interest_keywords: {{string}}, + price: double?, + start_time: datetime, + end_time: datetime +} + +create external dataset Event(EventType) +using localfs +(("path"="asterix_nc1://data/events/tiny/event.adm"),("format"="adm")); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.2.update.aql new file mode 100644 index 0000000..7cae9fa --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.2.update.aql @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +// no inserts, deletes http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.3.query.aql new file mode 100644 index 0000000..c522f65 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q2/q2.3.query.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $event in dataset('Event') +for $sponsor in $event.sponsoring_sigs +let $es := { "event": $event, "sponsor": $sponsor } +group by $sig_id := $sponsor.sig_id with $es +let $sig_sponsorship_count := count($es) +let $by_chapter := + for $e in $es + group by $chapter_name := $e.sponsor.chapter_name with $e + return { "chapter_name": $chapter_name, "escount" : count($e) } +order by $sig_sponsorship_count desc +limit 5 +return { "sig_id": $sig_id, "total_count": $sig_sponsorship_count, "chapter_breakdown": $by_chapter } + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.1.ddl.aql new file mode 100644 index 0000000..63e0e89 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.1.ddl.aql @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; +create dataverse test; +use dataverse test; + +create type AddressType as closed { + street: string, + city: string, + zip: string, + latlong: point2d +} + +create type UserType as open{ + name: string, + interests: {{string}}, + address: AddressType, + member_of: {{ + { + sig_id: int64, + chapter_name: string, + member_since: date + } +}} +} + +create dataset User(UserType) primary key name; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.2.update.aql new file mode 100644 index 0000000..205bf33 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.2.update.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +load dataset User +using localfs +(("path"="asterix_nc1://data/events/tiny/user.adm"),("format"="json")) pre-sorted; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.3.query.aql new file mode 100644 index 0000000..c51d0a8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dapd/q3/q3.3.query.aql @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +set simthreshold '.5f'; + +for $user in dataset('User') +let $similar_users := + for $similar_user in dataset('User') + where $user.name != $similar_user.name + and $user.interests ~= $similar_user.interests + let $sim := similarity-jaccard($user.interests, $similar_user.interests) + order by $sim desc + limit 10 + return { "user_name": $similar_user.name } +order by $user.name +return { "user_name" : $user.name, "similar_users" : $similar_users } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443-2/query-issue443-2.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443-2/query-issue443-2.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443-2/query-issue443-2.3.query.aql new file mode 100644 index 0000000..ad0edae --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443-2/query-issue443-2.3.query.aql @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : This test case is to verify the fix for issue443 + * https://code.google.com/p/asterixdb/issues/detail?id=443 + * Expected Res : Success + * Date : 22th May 2013 + */ + +for $a in [ {"f" : 19, "g": 1} , {"f" : 12, "g": 2} , {"f" : 10, "g": 1} , {"f" : 17, "g": 1}, {"f" : 12, "g": 4} ] +distinct by $a.f +return $a http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443/query-issue443.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443/query-issue443.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443/query-issue443.3.query.aql new file mode 100644 index 0000000..3e475f1 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/distinct/query-issue443/query-issue443.3.query.aql @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : This test case is to verify the fix for issue443 + : https://code.google.com/p/asterixdb/issues/detail?id=443 + * Expected Res : Fail + * Date : 22th May 2013 + */ + + +for $a in [ {"f" : 19} , {"f" : 12} , {"f" : 10} , {"f" : 17}, {"f" : 12} ] +distinct by $a.f +return $a http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.1.ddl.aql new file mode 100644 index 0000000..efda11a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.1.ddl.aql @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Test case Name : compact-dataset-and-its-indexes.aql + * Description : This test is intended to test the compact statement which merge the disk components of a dataset and + * all of its indexes. + * Expected Result : Success + * Date : Sep 19 2013 + */ + +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineItemType as closed { + l_orderkey: int64, + l_partkey: int64, + l_suppkey: int64, + l_linenumber: int64, + l_quantity: int64, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create dataset LineItem(LineItemType) + primary key l_orderkey, l_linenumber; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.2.update.aql new file mode 100644 index 0000000..7884380 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.2.update.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +load dataset LineItem +using localfs +(("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.3.ddl.aql new file mode 100644 index 0000000..4b88cc7 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.3.ddl.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +create index idx_LineItem_partkey on LineItem(l_linenumber); +create index idx_LineItem_suppkey on LineItem(l_suppkey); + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.4.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.4.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.4.update.aql new file mode 100644 index 0000000..98bf35c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.4.update.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +delete $l from dataset LineItem where $l.l_suppkey>=2 or $l.l_linenumber>1; + +compact dataset LineItem; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.5.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.5.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.5.query.aql new file mode 100644 index 0000000..a66862f --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/compact-dataset-and-its-indexes/compact-dataset-and-its-indexes.5.query.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +for $c in dataset('LineItem') +where $c.l_suppkey<150 +order by $c.l_orderkey, $c.l_linenumber +return $c http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.1.ddl.aql new file mode 100644 index 0000000..79df79f --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.1.ddl.aql @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create and drop and recreate the same closed type, here type has optional fields. + * : verify correctness by querying metadata. + * Date : 11th Feb 2013 + * Expected Res : Success + */ + +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type TestType as closed { +id : int32, +salary : double ?, +name : string, +durtn : duration ?, +inter : interval, +dt : date ?, +tm : time, +pt : point ? +} + +drop type TestType; + +create type TestType as closed { +id : int32, +salary : double ?, +name : string, +durtn : duration ?, +inter : interval, +dt : date ?, +tm : time, +pt : point ? +} + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.3.query.aql new file mode 100644 index 0000000..86cbc28 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-cltype/create-drop-cltype.3.query.aql @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create and drop and recreate the same closed type, here type has optional fields. + * : verify correctness by querying metadata. + * Date : 11th Feb 2013 + * Expected Res : Success + */ + +use dataverse test; + +for $l in dataset('Metadata.Datatype') +where $l.DatatypeName = 'TestType' +return $l http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.1.ddl.aql new file mode 100644 index 0000000..3a2890b --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.1.ddl.aql @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create and drop and recreate the same open type, here type has optional fields. + * : verify correctness by querying metadata. + * Date : 11th Feb 2013 + * Expected Res : Success + */ + +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type TestType as open { +id : int32, +salary : double ?, +name : string, +durtn : duration ?, +inter : interval, +dt : date ?, +tm : time, +pt : point ? +} + +drop type TestType; + +create type TestType as open { +id : int32, +salary : double ?, +name : string, +durtn : duration ?, +inter : interval, +dt : date ?, +tm : time, +pt : point ? +} + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.2.update.aql new file mode 100644 index 0000000..042f3ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.2.update.aql @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.3.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.3.query.aql new file mode 100644 index 0000000..7c176f8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/create-drop-opntype/create-drop-opntype.3.query.aql @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create and drop and recreate the same open type, here type has optional fields. + * : verify correctness by querying metadata. + * Date : 11th Feb 2013 + * Expected Res : Success + */ + +use dataverse test; + +for $l in dataset('Metadata.Datatype') +where $l.DatatypeName = 'TestType' +return $l http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.1.ddl.aql new file mode 100644 index 0000000..fc8d366 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.1.ddl.aql @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +drop dataverse test if exists; +create dataverse test; + +use dataverse test; + +create type LineItemType as closed { + l_orderkey: int64, + l_partkey: int64, + l_suppkey: int64, + l_linenumber: int64, + l_quantity: int64, + l_extendedprice: double, + l_discount: double, + l_tax: double, + l_returnflag: string, + l_linestatus: string, + l_shipdate: string, + l_commitdate: string, + l_receiptdate: string, + l_shipinstruct: string, + l_shipmode: string, + l_comment: string +} + +create dataset LineItem(LineItemType) + primary key l_orderkey, l_linenumber; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.2.update.aql new file mode 100644 index 0000000..7884380 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.2.update.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +load dataset LineItem +using localfs +(("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted; + http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.3.ddl.aql new file mode 100644 index 0000000..4b88cc7 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/delete-from-loaded-dataset-with-index/delete-from-loaded-dataset-with-index.3.ddl.aql @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +use dataverse test; + +create index idx_LineItem_partkey on LineItem(l_linenumber); +create index idx_LineItem_suppkey on LineItem(l_suppkey); +