You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2018/10/19 16:18:00 UTC
[28/51] [partial] asterixdb git commit: Revert "[ASTERIXDB-2454]
Remove non-unique AQL tests"
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.1.ddl.aql
new file mode 100644
index 0000000..204733e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.1.ddl.aql
@@ -0,0 +1,63 @@
+/*
+ * 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 custord;
+
+create type AddressType as open {
+ number: int32,
+ street: string,
+ city: string
+}
+
+create type CustomerType as open {
+ cid: int32,
+ name: string,
+ age: int32?,
+ address: AddressType?,
+ lastorder: {
+ oid: int32,
+ total: float
+ }
+}
+
+create type OrderType as open {
+ oid: int32,
+ cid: int32,
+ orderstatus: string,
+ orderpriority: string,
+ clerk: string,
+ total: float
+}
+
+create type CustomerOrdersType as open {
+ cid: int32,
+ cust: CustomerType,
+ orders: [OrderType]
+}
+
+create dataset Customers3(CustomerType)
+ primary key cid;
+create dataset Orders3(OrderType)
+ primary key oid;
+create dataset CustomerOrders3(CustomerOrdersType)
+ primary key cid;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.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/co/co.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.3.query.aql
new file mode 100644
index 0000000..f9bcdac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/co/co.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.
+ */
+use dataverse custord;
+
+/*
+for $co1 in dataset('CustomerOrders3')
+for $o1 in $co1.orders
+return {
+ "order": $o1,
+ "ordcust":
+ for $co2 in dataset('CustomerOrders3')
+ where some $o2 in $co2.orders
+ satisfies $o2.oid = $o1.oid
+ return $co2.cust
+}
+*/
+
+for $co1 in dataset('CustomerOrders3')
+where some $o1 in $co1.orders
+satisfies $o1.oid = 10
+return $co1
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.1.ddl.aql
new file mode 100644
index 0000000..2adc704
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.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 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_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/customer_q_01/customer_q_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_q_01.3.query.aql
new file mode 100644
index 0000000..773cd78
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_01/customer_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('Customers')
+return $c
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.1.ddl.aql
new file mode 100644
index 0000000..2330708
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.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 AddressType as open {
+ number: int32,
+ 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_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/customer_q_02/customer_q_02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.3.query.aql
new file mode 100644
index 0000000..19a0470
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_02/customer_q_02.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 $c in dataset('Customers')
+let $nestedRec := $c.lastorder
+return { "id": $c.cid, "nestedRecord":$nestedRec, "order_id" : $nestedRec.oid}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.1.ddl.aql
new file mode 100644
index 0000000..2330708
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.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 AddressType as open {
+ number: int32,
+ 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_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/customer_q_03/customer_q_03.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.3.query.aql
new file mode 100644
index 0000000..c5cb151
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_03/customer_q_03.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.
+ */
+use dataverse test;
+
+for $c in dataset('Customers')
+let $nestedRec := $c.lastorder
+let $c1 := [ $c.cid, $nestedRec.oid]
+let $c2 := {{ $c.cid, $nestedRec.oid}}
+let $c3 := [ $c.lastorder, $nestedRec]
+let $c4 := {{ $c.lastorder, $nestedRec}}
+where $c.cid >= int32("3")
+return { "id": $c.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/customer_q_04/customer_q_04.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.1.ddl.aql
new file mode 100644
index 0000000..2330708
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.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 AddressType as open {
+ number: int32,
+ 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_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/customer_q_04/customer_q_04.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.3.query.aql
new file mode 100644
index 0000000..1c3c3e2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_04/customer_q_04.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 $c in dataset('Customers')
+let $rec := { "cashBack":$c.cashBack, "cashBack+5": $c.cashBack+5, "cashBack-5": $c.cashBack -5, "cashBack*5": $c.cashBack*5, "cashBack/5": $c.cashBack/ 5, "-cashBack": -$c.cashBack}
+where $c.cid >= int32("3")
+return { "id": $c.cid, "custname":$c.name, "age" : $c.age, "MathcashBack": $rec }
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.1.ddl.aql
new file mode 100644
index 0000000..2330708
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.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 AddressType as open {
+ number: int32,
+ 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_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/customer_q_05/customer_q_05.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_q_05.3.query.aql
new file mode 100644
index 0000000..a1f48a0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_05/customer_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 $c in dataset('Customers')
+let $rec := { "age":$c.age, "age+5": $c.age+5, "age-5": $c.age -5, "age*5": $c.age*5, "age/5": $c.age/ 5, "-age": -$c.age}
+where $c.cid >= int32("3")
+return { "custname":$c.name, "age" : $c.age, "MathAge": $rec }
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.1.ddl.aql
new file mode 100644
index 0000000..2adc704
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.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 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_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/customer_q_06/customer_q_06.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.3.query.aql
new file mode 100644
index 0000000..c8d0f2d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_06/customer_q_06.3.query.aql
@@ -0,0 +1,25 @@
+/*
+ * 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('Customers')
+let $rec := $c.lastorder
+let $m := [$c.cid, $rec.oid]
+let $n := [$m[?], $m[1], $m[4]]
+return { "customerid": $c.name, "orderedlist": $n}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.1.ddl.aql
new file mode 100644
index 0000000..ea4ee7f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.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 closed {
+ cid: int64,
+ name: string,
+ cashBack: int64,
+ age: int64?,
+ address: AddressType?,
+ lastorder: {
+ oid: int64,
+ total: float
+ }
+}
+
+create external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.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/customer_q_07/customer_q_07.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.3.query.aql
new file mode 100644
index 0000000..95f35c6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_07/customer_q_07.3.query.aql
@@ -0,0 +1,25 @@
+/*
+ * 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('Customers')
+let $rec := $c.lastorder
+let $m := [$c.cid, $rec.oid]
+let $n := {{$m[?], $m[1], $m[4]}}
+return { "customerid": $c.name, "unorderedlist": $n}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.1.ddl.aql
new file mode 100644
index 0000000..2adc704
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.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 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 external dataset Customers(CustomerType)
+using localfs
+(("path"="asterix_nc1://data/nontagged/customerData.json"),("format"="adm"));
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.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/customer_q_08/customer_q_08.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.3.query.aql
new file mode 100644
index 0000000..46ca11c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/customer_q_08/customer_q_08.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 $c in dataset('Customers')
+where $c.age < 15
+return { "custname":$c.name, "custage": $c.age }
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.1.ddl.aql
new file mode 100644
index 0000000..63ab986
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.1.ddl.aql
@@ -0,0 +1,63 @@
+/*
+ * 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 type OrderType as open {
+ oid: int64,
+ cid: int64,
+ orderstatus: string,
+ orderpriority: string,
+ clerk: string,
+ total: float
+}
+
+create type CustomerOrdersType as open {
+ cid: int64,
+ cust: CustomerType,
+ orders: [OrderType]
+}
+
+create dataset Customers1(CustomerType)
+ primary key cid;
+create dataset Orders1(OrderType)
+ primary key oid;
+create dataset CustomerOrders1(CustomerOrdersType)
+ primary key cid;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.2.update.aql
new file mode 100644
index 0000000..b5a68ea
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.2.update.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.
+ */
+use dataverse test;
+
+load dataset Customers1
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/customer-tiny.adm"),("format"="adm")) pre-sorted;
+
+load dataset Orders1
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/order-tiny.adm"),("format"="adm")) pre-sorted;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.3.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.3.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.3.update.aql
new file mode 100644
index 0000000..55cb169
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_01/denorm-cust-order_01.3.update.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.
+ */
+use dataverse test;
+
+insert into dataset CustomerOrders1 (
+
+for $c in dataset('Customers1')
+for $o in dataset('Orders1')
+where $c.cid = $o.cid and $c.age < 21 and $c.total > 50.0
+group by $cid := $c.cid decor $cust := $c with $o
+return {"cid":$cid, "cust": $cust, "orders": $o}
+
+);
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.1.ddl.aql
new file mode 100644
index 0000000..c952521
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.1.ddl.aql
@@ -0,0 +1,63 @@
+/*
+ * 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 type OrderType as open {
+ oid: int64,
+ cid: int64,
+ orderstatus: string,
+ orderpriority: string,
+ clerk: string,
+ total: float
+}
+
+create type CustomerOrdersType as open {
+ cid: int64,
+ cust: CustomerType,
+ orders: [OrderType]
+}
+
+create dataset Customers2(CustomerType)
+ primary key cid;
+create dataset Orders2(OrderType)
+ primary key oid;
+create dataset CustomerOrders2(CustomerOrdersType)
+ primary key cid;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.2.update.aql
new file mode 100644
index 0000000..c38c5f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.2.update.aql
@@ -0,0 +1,39 @@
+/*
+ * 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 Customers2
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/customer-tiny.adm"),("format"="adm"));
+
+load dataset Orders2
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/order-tiny.adm"),("format"="adm"));
+
+insert into dataset CustomerOrders2 (
+
+for $c in dataset('Customers2')
+let $orders :=
+ for $o in dataset('Orders2')
+ where $o.cid = $c.cid
+ order by $o.oid asc
+ return $o
+return { "cid": $c.cid, "cust": $c, "orders": $orders }
+
+);
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.3.query.aql
new file mode 100644
index 0000000..c0cd33f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_02/denorm-cust-order_02.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 $co in dataset('CustomerOrders2')
+order by $co.cid
+return $co
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.1.ddl.aql
new file mode 100644
index 0000000..d36c8bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.1.ddl.aql
@@ -0,0 +1,63 @@
+/*
+ * 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 type OrderType as open {
+ oid: int64,
+ cid: int64,
+ orderstatus: string,
+ orderpriority: string,
+ clerk: string,
+ total: float
+}
+
+create type CustomerOrdersType as open {
+ cid: int64,
+ cust: CustomerType,
+ orders: [OrderType]
+}
+
+create dataset Customers3(CustomerType)
+ primary key cid;
+create dataset Orders3(OrderType)
+ primary key oid;
+create dataset CustomerOrders3(CustomerOrdersType)
+ primary key cid;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.2.update.aql
new file mode 100644
index 0000000..9796bb9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.2.update.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.
+ */
+use dataverse test;
+
+load dataset Customers3
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/customer-tiny.adm"),("format"="adm")) pre-sorted;
+
+load dataset Orders3
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/order-tiny.adm"),("format"="adm")) pre-sorted;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.3.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.3.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.3.update.aql
new file mode 100644
index 0000000..7a3f7ff
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.3.update.aql
@@ -0,0 +1,32 @@
+/*
+ * 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 CustomerOrders3 (
+
+for $c in dataset('Customers3')
+let $orders :=
+ for $o in dataset('Orders3')
+ where $o.cid = $c.cid
+ order by $o.orderpriority desc
+ return $o
+return { "cid": $c.cid, "cust": $c, "orders": $orders }
+
+);
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.4.query.aql
new file mode 100644
index 0000000..d96cdea
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/denorm-cust-order_03/denorm-cust-order_03.4.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.
+ */
+use dataverse test;
+
+for $co1 in dataset('CustomerOrders3')
+for $o1 in $co1.orders
+return {
+ "order": $o1,
+ "ordcust":
+ for $co2 in dataset('CustomerOrders3')
+ where some $o2 in $co2.orders
+ satisfies $o2.oid = $o1.oid
+ return $co2.cust
+}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.1.ddl.aql
new file mode 100644
index 0000000..23a2eb3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.1.ddl.aql
@@ -0,0 +1,50 @@
+/*
+ * 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: int32,
+ street: string,
+ city: string
+}
+
+create type CustomerOrderType as open {
+ cid: int32,
+ name: string,
+ age: int32?,
+ address: AddressType?,
+ orders: [OrderType]
+}
+
+create type OrderType as open {
+ oid: int32,
+ cid: int32,
+ orderstatus: string,
+ orderpriority: string,
+ clerk: string,
+ total: float
+}
+
+create dataset CustomerOrders(CustomerOrderType)
+ primary key cid;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.2.update.aql
new file mode 100644
index 0000000..9929adf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.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 CustomerOrders
+using localfs
+(("path"="asterix_nc1://data/custord-tiny/custorder-tiny.adm"),("format"="adm")) pre-sorted;
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.3.query.aql
new file mode 100644
index 0000000..dc7783e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/freq-clerk/freq-clerk.3.query.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;
+
+for $c in dataset('CustomerOrders')
+for $o in $c.orders
+group by $clerk := $o.clerk with $o
+let $count := count($o)
+order by $count, $clerk desc
+return { "clerk": $clerk, "ordercount": $count }
+
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.1.ddl.aql
new file mode 100644
index 0000000..c29c293
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.1.ddl.aql
@@ -0,0 +1,59 @@
+/*
+ * 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 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_01/join_q_01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_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/join_q_01/join_q_01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.3.query.aql
new file mode 100644
index 0000000..845534e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_01/join_q_01.3.query.aql
@@ -0,0 +1,25 @@
+/*
+ * 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('Customers')
+for $o in dataset('Orders')
+where $c.cid = $o.cid
+order by $c.name, $o.total
+return {"cust_name":$c.name, "cust_age": $c.age, "order_total":$o.total, "orderList":[$o.oid, $o.cid]}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.1.ddl.aql
new file mode 100644
index 0000000..c29c293
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.1.ddl.aql
@@ -0,0 +1,59 @@
+/*
+ * 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 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_02/join_q_02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_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/join_q_02/join_q_02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.3.query.aql
new file mode 100644
index 0000000..d917139
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_02/join_q_02.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.
+ */
+use dataverse test;
+
+for $c in dataset('Customers')
+for $o in dataset('Orders')
+let $rec := $c.lastorder
+let $ol := [$o.oid, $rec.oid, $o.cid]
+let $ul := {{$o.oid, $rec.oid, $o.cid}}
+where $c.cid = $o.cid
+order by $c.name, $o.total
+return {"cust_name":$c.name, "order_total": $o.total, "orderedlist": $ol, "unorderedlist": $ul }
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/c4dbb614/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.1.ddl.aql
new file mode 100644
index 0000000..9d0afab
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.1.ddl.aql
@@ -0,0 +1,60 @@
+/*
+ * 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 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_03/join_q_03.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.2.update.aql
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_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/join_q_03/join_q_03.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.3.query.aql
new file mode 100644
index 0000000..5279794
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/custord/join_q_03/join_q_03.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.
+ */
+use dataverse test;
+
+for $c in dataset('Customers')
+for $o in dataset('Orders')
+let $rec := $c.lastorder
+let $ol := [$o.oid, $rec.oid, $o.cid]
+let $ul := {{$o.oid, $rec.oid, $o.cid}}
+where $c.cid = $o.cid
+order by $c.name, $o.total
+return {"cust_name":$c.name, "order_total": $o.total, "orderedlist": $ol, "unorderedlist": $ul, "ol_item1": $ol[0], "ol_item2": $ol[1], "ol_item5": $ol[4], "ul_item1": $ul[?]}