Add Support for Upsert Operation
This change allows users to execute upsert commands which
couples delete if found with insert. It locks the primary
keys before doing the search ensuring consistency.
Change-Id: I8999000331795a5949d621d2dd003903e057a521
Reviewed-on: https://asterix-gerrit.ics.uci.edu/477
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.1.ddl.aql
new file mode 100644
index 0000000..5eea00b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.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.
+ */
+/*
+ * Description : Test filters with upsert pipeline
+ * Expected Res : Success
+ * Date : 13th Jan 2016
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+
+use dataverse test;
+
+create type FacebookMessageType as closed {
+ message-id: int64,
+ author-id: int64,
+ in-response-to: int64?,
+ sender-location: point?,
+ message: string,
+ send-time: datetime
+}
+
+create dataset FacebookMessages(FacebookMessageType)
+primary key message-id;
+
+create dataset FilteredFacebookMessages(FacebookMessageType)
+primary key message-id with filter on send-time;
+
+create index AutherIdx on FilteredFacebookMessages(author-id);
+create index MessageIdx on FilteredFacebookMessages(message);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.2.update.aql
new file mode 100644
index 0000000..eecf79d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.2.update.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;
+
+load dataset FilteredFacebookMessages using localfs
+(("path"="asterix_nc1://data/fbm-with-send-time.adm"),("format"="adm"));
+
+load dataset FacebookMessages using localfs
+(("path"="asterix_nc1://data/more-fbm-with-send-time.adm"),("format"="adm"));
+
+upsert into dataset FilteredFacebookMessages(
+ for $x in dataset FacebookMessages
+ return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.3.query.aql
new file mode 100644
index 0000000..d1b3925
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/filtered-dataset/filtered-dataset.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 $m in dataset('FilteredFacebookMessages')
+where $m.send-time > datetime("2012-08-20T10:10:00")
+return $m;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.1.ddl.aql
new file mode 100644
index 0000000..70960ed
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.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 MyRecord as closed {
+ id: int64,
+ point: point,
+ kwds: string,
+ line1: line,
+ line2: line,
+ poly1: polygon,
+ poly2: polygon,
+ rec: rectangle,
+ circle: circle
+}
+
+
+create dataset UpsertTo(MyRecord)
+ primary key id;
+
+ create dataset UpsertFrom(MyRecord)
+ primary key id;
+
+create index btree_index on UpsertTo(kwds);
+create index rtree_index on UpsertTo(point) type rtree;
+create index inverted_index on UpsertTo(kwds) type keyword;
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.2.update.aql
new file mode 100644
index 0000000..9e6086d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.2.update.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;
+
+load dataset UpsertTo
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/spatial/spatialData.json"),("format"="adm"));
+
+load dataset UpsertFrom
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/spatial/moreSpatialData.json"),("format"="adm"));
+
+
+upsert into dataset UpsertTo(
+for $x in dataset UpsertFrom
+return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.3.query.aql
new file mode 100644
index 0000000..a785237
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/multiple-secondaries/multiple-secondaries.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('UpsertTo')
+where spatial-intersect($o.point, create-polygon([4.0,1.0,4.0,4.0,12.0,4.0,12.0,1.0]))
+order by $o.id
+return {"id":$o.id}
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.1.ddl.aql
new file mode 100644
index 0000000..41cbd5a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.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 OrderTypetmp as closed {
+ o_orderkey: int64,
+ o_custkey: int64,
+ o_orderstatus: string,
+ o_totalprice: double,
+ o_orderdate: string,
+ o_orderpriority: string,
+ o_clerk: string,
+ o_shippriority: int64,
+ o_comment: string
+}
+
+create type OrderType as closed {
+nested : OrderTypetmp
+}
+
+create dataset UpsertTo(OrderTypetmp)
+ primary key o_orderkey;
+
+create dataset UpsertFrom(OrderTypetmp)
+ primary key o_orderkey;
+
+ create dataset Orders(OrderType)
+ primary key nested.o_orderkey;
+
+create index idx_Orders_Custkey on Orders(nested.o_custkey);
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.2.update.aql
new file mode 100644
index 0000000..7a46315
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.2.update.aql
@@ -0,0 +1,43 @@
+/*
+ * 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 UpsertTo
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+load dataset UpsertFrom
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/tpch0.001/other-orders.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+insert into dataset Orders
+(
+ for $c in dataset('UpsertTo')
+ return {
+ "nested" : $c
+ }
+);
+
+upsert into dataset Orders
+(
+ for $c in dataset('UpsertFrom')
+ return {
+ "nested" : $c
+ }
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.3.query.aql
new file mode 100644
index 0000000..6af352c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/nested-index/nested-index.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 $o in dataset('Orders')
+where
+ $o.nested.o_custkey < 60
+order by $o.nested.o_orderkey
+return {
+ "o_orderkey": $o.nested.o_orderkey,
+ "o_custkey": $o.nested.o_custkey
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.1.ddl.aql
new file mode 100644
index 0000000..c281fe1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.1.ddl.aql
@@ -0,0 +1,41 @@
+/*
+ * 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?,
+ interests: {{string}},
+ children: [ { name: string, age: int64? } ]
+}
+
+create dataset Customers(CustomerType) primary key cid;
+create dataset MoreCustomers(CustomerType) primary key cid;
+create index age_index on Customers(age);
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.2.update.aql
new file mode 100644
index 0000000..589eb3f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.2.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;
+
+load dataset Customers
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/semistructured/tiny01/customer.adm"),("format"="adm"));
+
+load dataset MoreCustomers
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/semistructured/tiny01/more-customer.adm"),("format"="adm"));
+
+upsert into dataset Customers(
+for $x in dataset MoreCustomers
+return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.3.query.aql
new file mode 100644
index 0000000..747e1ed
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/nullable-index/nullable-index.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')
+where $c.age < 20
+order by $c.cid
+return $c
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.1.ddl.aql
new file mode 100644
index 0000000..a1755ce
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.1.ddl.aql
@@ -0,0 +1,56 @@
+/*
+ * 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 closed {
+ o_orderkey: int64,
+ o_custkey: int64,
+ o_orderstatus: string,
+ o_totalprice: double,
+ o_orderdate: string,
+ o_orderpriority: string,
+ o_clerk: string,
+ o_shippriority: int64,
+ o_comment: string
+}
+
+create type OrderOpenType as open {
+ o_orderkey: int64,
+ o_orderstatus: string,
+ o_totalprice: double,
+ o_orderdate: string,
+ o_orderpriority: string,
+ o_clerk: string,
+ o_shippriority: int64,
+ o_comment: string
+}
+
+create dataset Orders(OrderType)
+ primary key o_orderkey;
+
+ create dataset OtherOrders(OrderType)
+ primary key o_orderkey;
+
+create dataset OrdersOpen(OrderOpenType)
+primary key o_orderkey;
+
+create index idx_Orders_Custkey on OrdersOpen(o_custkey:int32) enforced;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.2.update.aql
new file mode 100644
index 0000000..5951e05
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.2.update.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 test;
+
+load dataset Orders
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+load dataset OtherOrders
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/tpch0.001/other-orders.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+insert into dataset OrdersOpen (
+ for $x in dataset OtherOrders
+ return $x
+);
+
+upsert into dataset OrdersOpen (
+ for $x in dataset Orders
+ return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.3.query.aql
new file mode 100644
index 0000000..3b12c24
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/open-index/open-index.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 $o in dataset('OrdersOpen')
+where
+ $o.o_custkey > 40
+order by $o.o_orderkey
+return {
+ "o_orderkey": $o.o_orderkey,
+ "o_custkey": $o.o_custkey
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.1.ddl.aql
new file mode 100644
index 0000000..79c6fa7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.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.
+ */
+/*
+ * Description : Upsert into a dataset which doesn't have any secondary indexes
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as closed{
+id:int32,
+age:int32,
+name:string,
+salary:double
+};
+
+create dataset UpsertTo("TestType") primary key id;
+create dataset UpsertFrom("TestType") primary key id;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.2.update.aql
new file mode 100644
index 0000000..4446525
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.2.update.aql
@@ -0,0 +1,42 @@
+/*
+ * 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 : Upsert into a dataset which doesn't have any secondary indexes
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+use dataverse test;
+// load first dataset
+load dataset UpsertTo using
+localfs(("format"="delimited-text"),
+ ("path"="asterix_nc1://data/upsert/raw-data/overlapping.data"),
+ ("delimiter"=","));
+// load second dataset
+load dataset UpsertFrom using
+localfs(("format"="delimited-text"),
+ ("path"="asterix_nc1://data/upsert/raw-data/test-data.txt,asterix_nc1://data/upsert/raw-data/more-data.txt"),
+ ("delimiter"=","));
+
+// upsert UpsertFrom into UpsertTo
+use dataverse test;
+upsert into dataset UpsertTo(
+ for $x in dataset UpsertFrom
+ return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.3.query.aql
new file mode 100644
index 0000000..d614ed9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-index/primary-index.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.
+ */
+/*
+ * Description : Upsert into a dataset which doesn't have any secondary indexes
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+use dataverse test;
+for $x in dataset UpsertTo
+return $x;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.1.ddl.aql
new file mode 100644
index 0000000..258230b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.1.ddl.aql
@@ -0,0 +1,38 @@
+/*
+ * 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 : Upsert into a dataset which has a b-tree secondary index
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as closed{
+id:int32,
+age:int32,
+name:string,
+salary:double
+};
+
+create dataset UpsertTo("TestType") primary key id;
+create index ageindex on UpsertTo('age');
+create dataset UpsertFrom("TestType") primary key id;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.2.update.aql
new file mode 100644
index 0000000..9207acb
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.2.update.aql
@@ -0,0 +1,42 @@
+/*
+ * 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 : Upsert into a dataset which has a b-tree secondary index
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+use dataverse test;
+// load first dataset
+load dataset UpsertTo using
+localfs(("format"="delimited-text"),
+ ("path"="asterix_nc1://data/upsert/raw-data/overlapping.data"),
+ ("delimiter"=","));
+// load second dataset
+load dataset UpsertFrom using
+localfs(("format"="delimited-text"),
+ ("path"="asterix_nc1://data/upsert/raw-data/test-data.txt,asterix_nc1://data/upsert/raw-data/more-data.txt"),
+ ("delimiter"=","));
+
+// upsert UpsertFrom into UpsertTo
+use dataverse test;
+upsert into dataset UpsertTo(
+ for $x in dataset UpsertFrom
+ return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.3.query.aql
new file mode 100644
index 0000000..d52feb8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-btree/primary-secondary-btree.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 : Upsert into a dataset which has a b-tree secondary index
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+ // So far this one doesn't use the btree index, need another query
+use dataverse test;
+for $x in dataset UpsertTo
+where $x.age >5
+return $x;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.1.ddl.aql
new file mode 100644
index 0000000..143511e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.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 DBLPType as closed {
+ id: int64,
+ dblpid: string,
+ title: string,
+ authors: string,
+ misc: string
+}
+
+create dataset UpsertToDBLP(DBLPType)
+ primary key id;
+
+create dataset UpsertFromDBLP(DBLPType)
+ primary key id;
+
+create index keyword_index on UpsertToDBLP(title) type keyword;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.2.update.aql
new file mode 100644
index 0000000..054b26e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.2.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;
+
+load dataset UpsertToDBLP
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/dblp-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
+
+load dataset UpsertFromDBLP
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/dblp-small/more-dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
+
+upsert into dataset UpsertToDBLP(
+ for $x in dataset UpsertFromDBLP
+ return $x
+);
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.3.query.aql
new file mode 100644
index 0000000..112f1f9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-inverted/primary-secondary-inverted.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('UpsertToDBLP')
+where contains($o.title, "SQL")
+order by $o.id
+return $o
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.1.ddl.aql
new file mode 100644
index 0000000..d147852
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.1.ddl.aql
@@ -0,0 +1,41 @@
+/*
+ * 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 MyRecord as closed {
+ id: int64,
+ point: point,
+ kwds: string,
+ line1: line,
+ line2: line,
+ poly1: polygon,
+ poly2: polygon,
+ rec: rectangle,
+ circle: circle
+}
+
+create dataset UpsertTo(MyRecord)
+ primary key id;
+
+create dataset UpsertFrom(MyRecord)
+ primary key id;
+
+create index rtree_index_point on UpsertTo(point) type rtree;
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.2.update.aql
new file mode 100644
index 0000000..12b554f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.2.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;
+
+load dataset UpsertTo
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/spatial/spatialData.json"),("format"="adm"));
+
+load dataset UpsertFrom
+using "org.apache.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="asterix_nc1://data/spatial/moreSpatialData.json"),("format"="adm"));
+
+upsert into dataset UpsertTo(
+for $x in dataset UpsertFrom
+return $x
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.3.query.aql
new file mode 100644
index 0000000..a785237
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/primary-secondary-rtree/primary-secondary-rtree.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('UpsertTo')
+where spatial-intersect($o.point, create-polygon([4.0,1.0,4.0,4.0,12.0,4.0,12.0,1.0]))
+order by $o.id
+return {"id":$o.id}
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.1.ddl.aql
new file mode 100644
index 0000000..3dd1bcc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.1.ddl.aql
@@ -0,0 +1,36 @@
+/*
+ * 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 : Upsert into a dataset with self read
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as closed{
+id:int32,
+age:int32,
+name:string,
+salary:double
+};
+
+create dataset UpsertTo("TestType") primary key id;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.2.update.aql
new file mode 100644
index 0000000..e391384
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.2.update.aql
@@ -0,0 +1,41 @@
+/*
+ * 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 : Upsert into a dataset with self read
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+use dataverse test;
+// load first dataset
+load dataset UpsertTo using
+localfs(("format"="delimited-text"),
+ ("path"="asterix_nc1://data/upsert/raw-data/overlapping.data"),
+ ("delimiter"=","));
+
+// upsert UpsertFrom into UpsertTo
+upsert into dataset UpsertTo(
+ for $x in dataset UpsertTo
+ return {
+ "id":$x.id,
+ "age":$x.age+1,
+ "name":$x.name,
+ "salary":$x.salary*1.1
+ }
+);
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.3.query.aql
new file mode 100644
index 0000000..1344c3c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/upsert/upsert-with-self-read/upsert-with-self-read.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.
+ */
+/*
+ * Description : Upsert into a dataset with self read
+ * Expected Res : Success
+ * Date : Sep 15th 2015
+ */
+
+use dataverse test;
+for $x in dataset UpsertTo
+return $x;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/filtered-dataset/filtered-dataset.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/filtered-dataset/filtered-dataset.1.adm
new file mode 100644
index 0000000..2e4795e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/filtered-dataset/filtered-dataset.1.adm
@@ -0,0 +1,9 @@
+{ "message-id": 11, "author-id": 232, "in-response-to": 1, "sender-location": point("38.97,77.49"), "message": " can't stand at&t its plan is terrible", "send-time": datetime("2012-11-20T10:10:00.000Z") }
+{ "message-id": 12, "author-id": 10, "in-response-to": 6, "sender-location": point("42.26,77.76"), "message": " can't stand t-mobile its voicemail-service is OMG:(", "send-time": datetime("2012-12-20T10:10:00.000Z") }
+{ "message-id": 14, "author-id": 9, "in-response-to": 12, "sender-location": point("41.33,85.28"), "message": " love at&t its 3G is good:)", "send-time": datetime("2013-09-20T10:10:00.000Z") }
+{ "message-id": 13, "author-id": 10, "in-response-to": 4, "sender-location": point("42.77,78.92"), "message": " dislike iphone the voice-command is bad:(", "send-time": datetime("2013-08-20T10:10:00.000Z") }
+{ "message-id": 15, "author-id": 7, "in-response-to": 11, "sender-location": point("44.47,67.11"), "message": " like iphone the voicemail-service is awesome", "send-time": datetime("2014-01-20T10:10:00.000Z") }
+{ "message-id": 19, "author-id": 9, "in-response-to": 12, "sender-location": point("41.33,85.28"), "message": " love at&t its 3G is good:)", "send-time": datetime("2013-09-20T10:10:00.000Z") }
+{ "message-id": 9, "author-id": 65, "in-response-to": 12, "sender-location": point("34.45,96.48"), "message": " love verizon its wireless is good", "send-time": datetime("2012-09-20T10:10:00.000Z") }
+{ "message-id": 10, "author-id": 1, "in-response-to": 12, "sender-location": point("42.5,70.01"), "message": " can't stand motorola the touch-screen is terrible", "send-time": datetime("2012-10-20T10:10:00.000Z") }
+{ "message-id": 17, "author-id": 10, "in-response-to": 6, "sender-location": point("42.26,77.76"), "message": " can't stand t-mobile its voicemail-service is OMG:(", "send-time": datetime("2012-12-20T10:10:00.000Z") }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/multiple-secondaries/multiple-secondaries.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/multiple-secondaries/multiple-secondaries.1.adm
new file mode 100644
index 0000000..9c85166
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/multiple-secondaries/multiple-secondaries.1.adm
@@ -0,0 +1 @@
+{ "id": 20 }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/nested-index/nested-index.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/nested-index/nested-index.1.adm
new file mode 100644
index 0000000..351f3c6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/nested-index/nested-index.1.adm
@@ -0,0 +1,601 @@
+{ "o_orderkey": 1, "o_custkey": 37 }
+{ "o_orderkey": 5, "o_custkey": 46 }
+{ "o_orderkey": 6, "o_custkey": 56 }
+{ "o_orderkey": 7, "o_custkey": 40 }
+{ "o_orderkey": 64, "o_custkey": 34 }
+{ "o_orderkey": 65, "o_custkey": 17 }
+{ "o_orderkey": 67, "o_custkey": 58 }
+{ "o_orderkey": 68, "o_custkey": 29 }
+{ "o_orderkey": 71, "o_custkey": 4 }
+{ "o_orderkey": 97, "o_custkey": 22 }
+{ "o_orderkey": 101, "o_custkey": 28 }
+{ "o_orderkey": 102, "o_custkey": 1 }
+{ "o_orderkey": 103, "o_custkey": 31 }
+{ "o_orderkey": 130, "o_custkey": 37 }
+{ "o_orderkey": 132, "o_custkey": 28 }
+{ "o_orderkey": 133, "o_custkey": 44 }
+{ "o_orderkey": 134, "o_custkey": 7 }
+{ "o_orderkey": 161, "o_custkey": 17 }
+{ "o_orderkey": 162, "o_custkey": 16 }
+{ "o_orderkey": 164, "o_custkey": 1 }
+{ "o_orderkey": 165, "o_custkey": 28 }
+{ "o_orderkey": 197, "o_custkey": 34 }
+{ "o_orderkey": 199, "o_custkey": 53 }
+{ "o_orderkey": 224, "o_custkey": 4 }
+{ "o_orderkey": 225, "o_custkey": 34 }
+{ "o_orderkey": 227, "o_custkey": 10 }
+{ "o_orderkey": 228, "o_custkey": 46 }
+{ "o_orderkey": 258, "o_custkey": 43 }
+{ "o_orderkey": 259, "o_custkey": 44 }
+{ "o_orderkey": 261, "o_custkey": 47 }
+{ "o_orderkey": 262, "o_custkey": 31 }
+{ "o_orderkey": 288, "o_custkey": 8 }
+{ "o_orderkey": 292, "o_custkey": 23 }
+{ "o_orderkey": 293, "o_custkey": 31 }
+{ "o_orderkey": 294, "o_custkey": 52 }
+{ "o_orderkey": 295, "o_custkey": 19 }
+{ "o_orderkey": 320, "o_custkey": 1 }
+{ "o_orderkey": 323, "o_custkey": 40 }
+{ "o_orderkey": 325, "o_custkey": 41 }
+{ "o_orderkey": 353, "o_custkey": 2 }
+{ "o_orderkey": 358, "o_custkey": 4 }
+{ "o_orderkey": 385, "o_custkey": 34 }
+{ "o_orderkey": 387, "o_custkey": 4 }
+{ "o_orderkey": 388, "o_custkey": 46 }
+{ "o_orderkey": 416, "o_custkey": 41 }
+{ "o_orderkey": 417, "o_custkey": 55 }
+{ "o_orderkey": 421, "o_custkey": 40 }
+{ "o_orderkey": 450, "o_custkey": 49 }
+{ "o_orderkey": 453, "o_custkey": 46 }
+{ "o_orderkey": 454, "o_custkey": 49 }
+{ "o_orderkey": 455, "o_custkey": 13 }
+{ "o_orderkey": 481, "o_custkey": 31 }
+{ "o_orderkey": 483, "o_custkey": 35 }
+{ "o_orderkey": 484, "o_custkey": 55 }
+{ "o_orderkey": 486, "o_custkey": 52 }
+{ "o_orderkey": 516, "o_custkey": 44 }
+{ "o_orderkey": 517, "o_custkey": 10 }
+{ "o_orderkey": 550, "o_custkey": 25 }
+{ "o_orderkey": 576, "o_custkey": 31 }
+{ "o_orderkey": 577, "o_custkey": 56 }
+{ "o_orderkey": 582, "o_custkey": 50 }
+{ "o_orderkey": 583, "o_custkey": 49 }
+{ "o_orderkey": 608, "o_custkey": 26 }
+{ "o_orderkey": 610, "o_custkey": 52 }
+{ "o_orderkey": 642, "o_custkey": 40 }
+{ "o_orderkey": 643, "o_custkey": 58 }
+{ "o_orderkey": 644, "o_custkey": 8 }
+{ "o_orderkey": 646, "o_custkey": 52 }
+{ "o_orderkey": 674, "o_custkey": 34 }
+{ "o_orderkey": 675, "o_custkey": 13 }
+{ "o_orderkey": 676, "o_custkey": 38 }
+{ "o_orderkey": 679, "o_custkey": 49 }
+{ "o_orderkey": 705, "o_custkey": 43 }
+{ "o_orderkey": 708, "o_custkey": 32 }
+{ "o_orderkey": 709, "o_custkey": 37 }
+{ "o_orderkey": 736, "o_custkey": 47 }
+{ "o_orderkey": 738, "o_custkey": 22 }
+{ "o_orderkey": 739, "o_custkey": 1 }
+{ "o_orderkey": 740, "o_custkey": 44 }
+{ "o_orderkey": 770, "o_custkey": 32 }
+{ "o_orderkey": 771, "o_custkey": 46 }
+{ "o_orderkey": 800, "o_custkey": 56 }
+{ "o_orderkey": 803, "o_custkey": 16 }
+{ "o_orderkey": 804, "o_custkey": 50 }
+{ "o_orderkey": 832, "o_custkey": 29 }
+{ "o_orderkey": 833, "o_custkey": 56 }
+{ "o_orderkey": 834, "o_custkey": 43 }
+{ "o_orderkey": 838, "o_custkey": 17 }
+{ "o_orderkey": 839, "o_custkey": 28 }
+{ "o_orderkey": 865, "o_custkey": 4 }
+{ "o_orderkey": 866, "o_custkey": 40 }
+{ "o_orderkey": 867, "o_custkey": 26 }
+{ "o_orderkey": 870, "o_custkey": 34 }
+{ "o_orderkey": 871, "o_custkey": 16 }
+{ "o_orderkey": 896, "o_custkey": 2 }
+{ "o_orderkey": 897, "o_custkey": 49 }
+{ "o_orderkey": 898, "o_custkey": 55 }
+{ "o_orderkey": 900, "o_custkey": 46 }
+{ "o_orderkey": 901, "o_custkey": 13 }
+{ "o_orderkey": 902, "o_custkey": 10 }
+{ "o_orderkey": 903, "o_custkey": 11 }
+{ "o_orderkey": 932, "o_custkey": 41 }
+{ "o_orderkey": 934, "o_custkey": 52 }
+{ "o_orderkey": 935, "o_custkey": 50 }
+{ "o_orderkey": 960, "o_custkey": 35 }
+{ "o_orderkey": 961, "o_custkey": 56 }
+{ "o_orderkey": 962, "o_custkey": 37 }
+{ "o_orderkey": 963, "o_custkey": 26 }
+{ "o_orderkey": 966, "o_custkey": 14 }
+{ "o_orderkey": 992, "o_custkey": 55 }
+{ "o_orderkey": 994, "o_custkey": 2 }
+{ "o_orderkey": 998, "o_custkey": 32 }
+{ "o_orderkey": 1024, "o_custkey": 4 }
+{ "o_orderkey": 1031, "o_custkey": 4 }
+{ "o_orderkey": 1056, "o_custkey": 28 }
+{ "o_orderkey": 1058, "o_custkey": 53 }
+{ "o_orderkey": 1063, "o_custkey": 37 }
+{ "o_orderkey": 1089, "o_custkey": 49 }
+{ "o_orderkey": 1090, "o_custkey": 19 }
+{ "o_orderkey": 1121, "o_custkey": 29 }
+{ "o_orderkey": 1125, "o_custkey": 25 }
+{ "o_orderkey": 1127, "o_custkey": 58 }
+{ "o_orderkey": 1152, "o_custkey": 49 }
+{ "o_orderkey": 1154, "o_custkey": 37 }
+{ "o_orderkey": 1186, "o_custkey": 59 }
+{ "o_orderkey": 1188, "o_custkey": 20 }
+{ "o_orderkey": 1189, "o_custkey": 46 }
+{ "o_orderkey": 1190, "o_custkey": 13 }
+{ "o_orderkey": 1217, "o_custkey": 7 }
+{ "o_orderkey": 1218, "o_custkey": 10 }
+{ "o_orderkey": 1219, "o_custkey": 28 }
+{ "o_orderkey": 1220, "o_custkey": 49 }
+{ "o_orderkey": 1221, "o_custkey": 14 }
+{ "o_orderkey": 1222, "o_custkey": 10 }
+{ "o_orderkey": 1223, "o_custkey": 10 }
+{ "o_orderkey": 1248, "o_custkey": 49 }
+{ "o_orderkey": 1250, "o_custkey": 37 }
+{ "o_orderkey": 1251, "o_custkey": 38 }
+{ "o_orderkey": 1285, "o_custkey": 11 }
+{ "o_orderkey": 1287, "o_custkey": 19 }
+{ "o_orderkey": 1315, "o_custkey": 22 }
+{ "o_orderkey": 1316, "o_custkey": 16 }
+{ "o_orderkey": 1319, "o_custkey": 32 }
+{ "o_orderkey": 1344, "o_custkey": 17 }
+{ "o_orderkey": 1347, "o_custkey": 41 }
+{ "o_orderkey": 1348, "o_custkey": 19 }
+{ "o_orderkey": 1350, "o_custkey": 52 }
+{ "o_orderkey": 1376, "o_custkey": 47 }
+{ "o_orderkey": 1377, "o_custkey": 20 }
+{ "o_orderkey": 1378, "o_custkey": 20 }
+{ "o_orderkey": 1408, "o_custkey": 55 }
+{ "o_orderkey": 1412, "o_custkey": 53 }
+{ "o_orderkey": 1443, "o_custkey": 44 }
+{ "o_orderkey": 1446, "o_custkey": 41 }
+{ "o_orderkey": 1475, "o_custkey": 5 }
+{ "o_orderkey": 1478, "o_custkey": 50 }
+{ "o_orderkey": 1479, "o_custkey": 16 }
+{ "o_orderkey": 1504, "o_custkey": 2 }
+{ "o_orderkey": 1505, "o_custkey": 37 }
+{ "o_orderkey": 1510, "o_custkey": 53 }
+{ "o_orderkey": 1538, "o_custkey": 29 }
+{ "o_orderkey": 1540, "o_custkey": 16 }
+{ "o_orderkey": 1543, "o_custkey": 52 }
+{ "o_orderkey": 1568, "o_custkey": 17 }
+{ "o_orderkey": 1572, "o_custkey": 11 }
+{ "o_orderkey": 1601, "o_custkey": 53 }
+{ "o_orderkey": 1602, "o_custkey": 1 }
+{ "o_orderkey": 1603, "o_custkey": 2 }
+{ "o_orderkey": 1605, "o_custkey": 58 }
+{ "o_orderkey": 1606, "o_custkey": 53 }
+{ "o_orderkey": 1633, "o_custkey": 16 }
+{ "o_orderkey": 1635, "o_custkey": 4 }
+{ "o_orderkey": 1639, "o_custkey": 5 }
+{ "o_orderkey": 1667, "o_custkey": 5 }
+{ "o_orderkey": 1669, "o_custkey": 2 }
+{ "o_orderkey": 1670, "o_custkey": 25 }
+{ "o_orderkey": 1671, "o_custkey": 35 }
+{ "o_orderkey": 1696, "o_custkey": 4 }
+{ "o_orderkey": 1698, "o_custkey": 40 }
+{ "o_orderkey": 1734, "o_custkey": 7 }
+{ "o_orderkey": 1735, "o_custkey": 22 }
+{ "o_orderkey": 1764, "o_custkey": 29 }
+{ "o_orderkey": 1767, "o_custkey": 25 }
+{ "o_orderkey": 1792, "o_custkey": 49 }
+{ "o_orderkey": 1793, "o_custkey": 19 }
+{ "o_orderkey": 1796, "o_custkey": 47 }
+{ "o_orderkey": 1798, "o_custkey": 52 }
+{ "o_orderkey": 1824, "o_custkey": 49 }
+{ "o_orderkey": 1828, "o_custkey": 32 }
+{ "o_orderkey": 1860, "o_custkey": 10 }
+{ "o_orderkey": 1862, "o_custkey": 34 }
+{ "o_orderkey": 1889, "o_custkey": 25 }
+{ "o_orderkey": 1890, "o_custkey": 10 }
+{ "o_orderkey": 1892, "o_custkey": 25 }
+{ "o_orderkey": 1895, "o_custkey": 7 }
+{ "o_orderkey": 1922, "o_custkey": 56 }
+{ "o_orderkey": 1925, "o_custkey": 17 }
+{ "o_orderkey": 1954, "o_custkey": 56 }
+{ "o_orderkey": 1955, "o_custkey": 13 }
+{ "o_orderkey": 1957, "o_custkey": 31 }
+{ "o_orderkey": 1958, "o_custkey": 53 }
+{ "o_orderkey": 1959, "o_custkey": 43 }
+{ "o_orderkey": 1984, "o_custkey": 52 }
+{ "o_orderkey": 1985, "o_custkey": 7 }
+{ "o_orderkey": 1991, "o_custkey": 19 }
+{ "o_orderkey": 2016, "o_custkey": 8 }
+{ "o_orderkey": 2018, "o_custkey": 19 }
+{ "o_orderkey": 2048, "o_custkey": 17 }
+{ "o_orderkey": 2049, "o_custkey": 31 }
+{ "o_orderkey": 2050, "o_custkey": 28 }
+{ "o_orderkey": 2051, "o_custkey": 40 }
+{ "o_orderkey": 2054, "o_custkey": 41 }
+{ "o_orderkey": 2082, "o_custkey": 49 }
+{ "o_orderkey": 2085, "o_custkey": 49 }
+{ "o_orderkey": 2087, "o_custkey": 50 }
+{ "o_orderkey": 2113, "o_custkey": 32 }
+{ "o_orderkey": 2116, "o_custkey": 23 }
+{ "o_orderkey": 2117, "o_custkey": 22 }
+{ "o_orderkey": 2151, "o_custkey": 58 }
+{ "o_orderkey": 2178, "o_custkey": 8 }
+{ "o_orderkey": 2179, "o_custkey": 41 }
+{ "o_orderkey": 2182, "o_custkey": 23 }
+{ "o_orderkey": 2210, "o_custkey": 32 }
+{ "o_orderkey": 2215, "o_custkey": 40 }
+{ "o_orderkey": 2240, "o_custkey": 56 }
+{ "o_orderkey": 2243, "o_custkey": 49 }
+{ "o_orderkey": 2245, "o_custkey": 58 }
+{ "o_orderkey": 2276, "o_custkey": 43 }
+{ "o_orderkey": 2304, "o_custkey": 46 }
+{ "o_orderkey": 2305, "o_custkey": 43 }
+{ "o_orderkey": 2306, "o_custkey": 28 }
+{ "o_orderkey": 2308, "o_custkey": 25 }
+{ "o_orderkey": 2310, "o_custkey": 31 }
+{ "o_orderkey": 2342, "o_custkey": 37 }
+{ "o_orderkey": 2368, "o_custkey": 13 }
+{ "o_orderkey": 2371, "o_custkey": 19 }
+{ "o_orderkey": 2372, "o_custkey": 31 }
+{ "o_orderkey": 2373, "o_custkey": 28 }
+{ "o_orderkey": 2374, "o_custkey": 4 }
+{ "o_orderkey": 2375, "o_custkey": 5 }
+{ "o_orderkey": 2400, "o_custkey": 37 }
+{ "o_orderkey": 2403, "o_custkey": 55 }
+{ "o_orderkey": 2406, "o_custkey": 7 }
+{ "o_orderkey": 2407, "o_custkey": 55 }
+{ "o_orderkey": 2433, "o_custkey": 31 }
+{ "o_orderkey": 2434, "o_custkey": 25 }
+{ "o_orderkey": 2438, "o_custkey": 13 }
+{ "o_orderkey": 2439, "o_custkey": 55 }
+{ "o_orderkey": 2465, "o_custkey": 34 }
+{ "o_orderkey": 2466, "o_custkey": 19 }
+{ "o_orderkey": 2467, "o_custkey": 35 }
+{ "o_orderkey": 2470, "o_custkey": 58 }
+{ "o_orderkey": 2497, "o_custkey": 47 }
+{ "o_orderkey": 2503, "o_custkey": 7 }
+{ "o_orderkey": 2528, "o_custkey": 55 }
+{ "o_orderkey": 2531, "o_custkey": 44 }
+{ "o_orderkey": 2533, "o_custkey": 50 }
+{ "o_orderkey": 2561, "o_custkey": 58 }
+{ "o_orderkey": 2562, "o_custkey": 10 }
+{ "o_orderkey": 2565, "o_custkey": 56 }
+{ "o_orderkey": 2596, "o_custkey": 43 }
+{ "o_orderkey": 2624, "o_custkey": 52 }
+{ "o_orderkey": 2625, "o_custkey": 40 }
+{ "o_orderkey": 2628, "o_custkey": 56 }
+{ "o_orderkey": 2631, "o_custkey": 37 }
+{ "o_orderkey": 2657, "o_custkey": 25 }
+{ "o_orderkey": 2658, "o_custkey": 14 }
+{ "o_orderkey": 2662, "o_custkey": 37 }
+{ "o_orderkey": 2691, "o_custkey": 7 }
+{ "o_orderkey": 2693, "o_custkey": 19 }
+{ "o_orderkey": 2695, "o_custkey": 58 }
+{ "o_orderkey": 2720, "o_custkey": 31 }
+{ "o_orderkey": 2722, "o_custkey": 35 }
+{ "o_orderkey": 2726, "o_custkey": 7 }
+{ "o_orderkey": 2752, "o_custkey": 59 }
+{ "o_orderkey": 2753, "o_custkey": 16 }
+{ "o_orderkey": 2758, "o_custkey": 43 }
+{ "o_orderkey": 2789, "o_custkey": 37 }
+{ "o_orderkey": 2790, "o_custkey": 25 }
+{ "o_orderkey": 2816, "o_custkey": 58 }
+{ "o_orderkey": 2817, "o_custkey": 40 }
+{ "o_orderkey": 2818, "o_custkey": 49 }
+{ "o_orderkey": 2820, "o_custkey": 19 }
+{ "o_orderkey": 2849, "o_custkey": 46 }
+{ "o_orderkey": 2855, "o_custkey": 49 }
+{ "o_orderkey": 2880, "o_custkey": 8 }
+{ "o_orderkey": 2885, "o_custkey": 7 }
+{ "o_orderkey": 2913, "o_custkey": 43 }
+{ "o_orderkey": 2916, "o_custkey": 8 }
+{ "o_orderkey": 2919, "o_custkey": 53 }
+{ "o_orderkey": 2944, "o_custkey": 14 }
+{ "o_orderkey": 2945, "o_custkey": 29 }
+{ "o_orderkey": 2948, "o_custkey": 44 }
+{ "o_orderkey": 2976, "o_custkey": 29 }
+{ "o_orderkey": 2978, "o_custkey": 44 }
+{ "o_orderkey": 2980, "o_custkey": 4 }
+{ "o_orderkey": 2981, "o_custkey": 49 }
+{ "o_orderkey": 3008, "o_custkey": 40 }
+{ "o_orderkey": 3009, "o_custkey": 55 }
+{ "o_orderkey": 3010, "o_custkey": 8 }
+{ "o_orderkey": 3012, "o_custkey": 32 }
+{ "o_orderkey": 3014, "o_custkey": 29 }
+{ "o_orderkey": 3042, "o_custkey": 20 }
+{ "o_orderkey": 3043, "o_custkey": 44 }
+{ "o_orderkey": 3044, "o_custkey": 53 }
+{ "o_orderkey": 3045, "o_custkey": 50 }
+{ "o_orderkey": 3046, "o_custkey": 32 }
+{ "o_orderkey": 3047, "o_custkey": 25 }
+{ "o_orderkey": 3072, "o_custkey": 23 }
+{ "o_orderkey": 3078, "o_custkey": 49 }
+{ "o_orderkey": 3107, "o_custkey": 26 }
+{ "o_orderkey": 3136, "o_custkey": 23 }
+{ "o_orderkey": 3139, "o_custkey": 17 }
+{ "o_orderkey": 3141, "o_custkey": 26 }
+{ "o_orderkey": 3142, "o_custkey": 8 }
+{ "o_orderkey": 3169, "o_custkey": 19 }
+{ "o_orderkey": 3170, "o_custkey": 5 }
+{ "o_orderkey": 3171, "o_custkey": 47 }
+{ "o_orderkey": 3175, "o_custkey": 44 }
+{ "o_orderkey": 3200, "o_custkey": 13 }
+{ "o_orderkey": 3204, "o_custkey": 10 }
+{ "o_orderkey": 3207, "o_custkey": 22 }
+{ "o_orderkey": 3234, "o_custkey": 14 }
+{ "o_orderkey": 3235, "o_custkey": 46 }
+{ "o_orderkey": 3237, "o_custkey": 19 }
+{ "o_orderkey": 3239, "o_custkey": 35 }
+{ "o_orderkey": 3265, "o_custkey": 53 }
+{ "o_orderkey": 3266, "o_custkey": 4 }
+{ "o_orderkey": 3269, "o_custkey": 17 }
+{ "o_orderkey": 3270, "o_custkey": 38 }
+{ "o_orderkey": 3271, "o_custkey": 34 }
+{ "o_orderkey": 3302, "o_custkey": 34 }
+{ "o_orderkey": 3328, "o_custkey": 7 }
+{ "o_orderkey": 3329, "o_custkey": 4 }
+{ "o_orderkey": 3330, "o_custkey": 7 }
+{ "o_orderkey": 3335, "o_custkey": 49 }
+{ "o_orderkey": 3361, "o_custkey": 49 }
+{ "o_orderkey": 3363, "o_custkey": 52 }
+{ "o_orderkey": 3364, "o_custkey": 46 }
+{ "o_orderkey": 3366, "o_custkey": 52 }
+{ "o_orderkey": 3426, "o_custkey": 53 }
+{ "o_orderkey": 3427, "o_custkey": 4 }
+{ "o_orderkey": 3428, "o_custkey": 10 }
+{ "o_orderkey": 3431, "o_custkey": 47 }
+{ "o_orderkey": 3456, "o_custkey": 46 }
+{ "o_orderkey": 3457, "o_custkey": 25 }
+{ "o_orderkey": 3494, "o_custkey": 49 }
+{ "o_orderkey": 3495, "o_custkey": 31 }
+{ "o_orderkey": 3521, "o_custkey": 7 }
+{ "o_orderkey": 3522, "o_custkey": 26 }
+{ "o_orderkey": 3526, "o_custkey": 56 }
+{ "o_orderkey": 3527, "o_custkey": 56 }
+{ "o_orderkey": 3552, "o_custkey": 35 }
+{ "o_orderkey": 3554, "o_custkey": 44 }
+{ "o_orderkey": 3555, "o_custkey": 46 }
+{ "o_orderkey": 3556, "o_custkey": 16 }
+{ "o_orderkey": 3558, "o_custkey": 28 }
+{ "o_orderkey": 3584, "o_custkey": 13 }
+{ "o_orderkey": 3589, "o_custkey": 31 }
+{ "o_orderkey": 3617, "o_custkey": 40 }
+{ "o_orderkey": 3618, "o_custkey": 10 }
+{ "o_orderkey": 3620, "o_custkey": 44 }
+{ "o_orderkey": 3623, "o_custkey": 4 }
+{ "o_orderkey": 3649, "o_custkey": 40 }
+{ "o_orderkey": 3650, "o_custkey": 46 }
+{ "o_orderkey": 3653, "o_custkey": 40 }
+{ "o_orderkey": 3654, "o_custkey": 7 }
+{ "o_orderkey": 3655, "o_custkey": 49 }
+{ "o_orderkey": 3681, "o_custkey": 52 }
+{ "o_orderkey": 3682, "o_custkey": 32 }
+{ "o_orderkey": 3684, "o_custkey": 23 }
+{ "o_orderkey": 3685, "o_custkey": 16 }
+{ "o_orderkey": 3686, "o_custkey": 40 }
+{ "o_orderkey": 3687, "o_custkey": 43 }
+{ "o_orderkey": 3714, "o_custkey": 40 }
+{ "o_orderkey": 3716, "o_custkey": 43 }
+{ "o_orderkey": 3717, "o_custkey": 28 }
+{ "o_orderkey": 3718, "o_custkey": 31 }
+{ "o_orderkey": 3748, "o_custkey": 53 }
+{ "o_orderkey": 3749, "o_custkey": 38 }
+{ "o_orderkey": 3751, "o_custkey": 10 }
+{ "o_orderkey": 3777, "o_custkey": 28 }
+{ "o_orderkey": 3780, "o_custkey": 41 }
+{ "o_orderkey": 3783, "o_custkey": 44 }
+{ "o_orderkey": 3812, "o_custkey": 41 }
+{ "o_orderkey": 3841, "o_custkey": 58 }
+{ "o_orderkey": 3842, "o_custkey": 28 }
+{ "o_orderkey": 3843, "o_custkey": 10 }
+{ "o_orderkey": 3846, "o_custkey": 49 }
+{ "o_orderkey": 3847, "o_custkey": 34 }
+{ "o_orderkey": 3873, "o_custkey": 55 }
+{ "o_orderkey": 3876, "o_custkey": 29 }
+{ "o_orderkey": 3877, "o_custkey": 17 }
+{ "o_orderkey": 3905, "o_custkey": 22 }
+{ "o_orderkey": 3906, "o_custkey": 46 }
+{ "o_orderkey": 3908, "o_custkey": 43 }
+{ "o_orderkey": 3909, "o_custkey": 22 }
+{ "o_orderkey": 3911, "o_custkey": 10 }
+{ "o_orderkey": 3936, "o_custkey": 32 }
+{ "o_orderkey": 3938, "o_custkey": 31 }
+{ "o_orderkey": 3943, "o_custkey": 40 }
+{ "o_orderkey": 3968, "o_custkey": 25 }
+{ "o_orderkey": 3969, "o_custkey": 52 }
+{ "o_orderkey": 4006, "o_custkey": 35 }
+{ "o_orderkey": 4007, "o_custkey": 8 }
+{ "o_orderkey": 4032, "o_custkey": 10 }
+{ "o_orderkey": 4036, "o_custkey": 47 }
+{ "o_orderkey": 4039, "o_custkey": 29 }
+{ "o_orderkey": 4066, "o_custkey": 32 }
+{ "o_orderkey": 4067, "o_custkey": 16 }
+{ "o_orderkey": 4070, "o_custkey": 29 }
+{ "o_orderkey": 4097, "o_custkey": 10 }
+{ "o_orderkey": 4098, "o_custkey": 23 }
+{ "o_orderkey": 4099, "o_custkey": 17 }
+{ "o_orderkey": 4100, "o_custkey": 4 }
+{ "o_orderkey": 4102, "o_custkey": 22 }
+{ "o_orderkey": 4129, "o_custkey": 32 }
+{ "o_orderkey": 4131, "o_custkey": 44 }
+{ "o_orderkey": 4132, "o_custkey": 19 }
+{ "o_orderkey": 4135, "o_custkey": 37 }
+{ "o_orderkey": 4160, "o_custkey": 55 }
+{ "o_orderkey": 4162, "o_custkey": 22 }
+{ "o_orderkey": 4165, "o_custkey": 4 }
+{ "o_orderkey": 4166, "o_custkey": 43 }
+{ "o_orderkey": 4167, "o_custkey": 28 }
+{ "o_orderkey": 4193, "o_custkey": 4 }
+{ "o_orderkey": 4199, "o_custkey": 5 }
+{ "o_orderkey": 4229, "o_custkey": 14 }
+{ "o_orderkey": 4257, "o_custkey": 17 }
+{ "o_orderkey": 4263, "o_custkey": 4 }
+{ "o_orderkey": 4288, "o_custkey": 34 }
+{ "o_orderkey": 4290, "o_custkey": 41 }
+{ "o_orderkey": 4292, "o_custkey": 25 }
+{ "o_orderkey": 4294, "o_custkey": 49 }
+{ "o_orderkey": 4295, "o_custkey": 5 }
+{ "o_orderkey": 4321, "o_custkey": 16 }
+{ "o_orderkey": 4326, "o_custkey": 29 }
+{ "o_orderkey": 4352, "o_custkey": 14 }
+{ "o_orderkey": 4355, "o_custkey": 4 }
+{ "o_orderkey": 4357, "o_custkey": 47 }
+{ "o_orderkey": 4358, "o_custkey": 25 }
+{ "o_orderkey": 4359, "o_custkey": 16 }
+{ "o_orderkey": 4384, "o_custkey": 25 }
+{ "o_orderkey": 4388, "o_custkey": 10 }
+{ "o_orderkey": 4389, "o_custkey": 55 }
+{ "o_orderkey": 4390, "o_custkey": 7 }
+{ "o_orderkey": 4391, "o_custkey": 38 }
+{ "o_orderkey": 4421, "o_custkey": 10 }
+{ "o_orderkey": 4449, "o_custkey": 10 }
+{ "o_orderkey": 4451, "o_custkey": 4 }
+{ "o_orderkey": 4452, "o_custkey": 13 }
+{ "o_orderkey": 4455, "o_custkey": 19 }
+{ "o_orderkey": 4483, "o_custkey": 52 }
+{ "o_orderkey": 4485, "o_custkey": 53 }
+{ "o_orderkey": 4486, "o_custkey": 37 }
+{ "o_orderkey": 4487, "o_custkey": 46 }
+{ "o_orderkey": 4545, "o_custkey": 59 }
+{ "o_orderkey": 4546, "o_custkey": 43 }
+{ "o_orderkey": 4582, "o_custkey": 19 }
+{ "o_orderkey": 4583, "o_custkey": 22 }
+{ "o_orderkey": 4610, "o_custkey": 26 }
+{ "o_orderkey": 4611, "o_custkey": 29 }
+{ "o_orderkey": 4615, "o_custkey": 29 }
+{ "o_orderkey": 4645, "o_custkey": 44 }
+{ "o_orderkey": 4647, "o_custkey": 28 }
+{ "o_orderkey": 4674, "o_custkey": 37 }
+{ "o_orderkey": 4676, "o_custkey": 14 }
+{ "o_orderkey": 4677, "o_custkey": 40 }
+{ "o_orderkey": 4704, "o_custkey": 2 }
+{ "o_orderkey": 4706, "o_custkey": 25 }
+{ "o_orderkey": 4709, "o_custkey": 26 }
+{ "o_orderkey": 4738, "o_custkey": 5 }
+{ "o_orderkey": 4770, "o_custkey": 59 }
+{ "o_orderkey": 4772, "o_custkey": 28 }
+{ "o_orderkey": 4774, "o_custkey": 52 }
+{ "o_orderkey": 4800, "o_custkey": 37 }
+{ "o_orderkey": 4804, "o_custkey": 37 }
+{ "o_orderkey": 4805, "o_custkey": 16 }
+{ "o_orderkey": 4806, "o_custkey": 7 }
+{ "o_orderkey": 4807, "o_custkey": 53 }
+{ "o_orderkey": 4832, "o_custkey": 34 }
+{ "o_orderkey": 4834, "o_custkey": 19 }
+{ "o_orderkey": 4838, "o_custkey": 44 }
+{ "o_orderkey": 4839, "o_custkey": 25 }
+{ "o_orderkey": 4866, "o_custkey": 53 }
+{ "o_orderkey": 4867, "o_custkey": 10 }
+{ "o_orderkey": 4869, "o_custkey": 58 }
+{ "o_orderkey": 4871, "o_custkey": 46 }
+{ "o_orderkey": 4898, "o_custkey": 14 }
+{ "o_orderkey": 4928, "o_custkey": 4 }
+{ "o_orderkey": 4931, "o_custkey": 50 }
+{ "o_orderkey": 4934, "o_custkey": 40 }
+{ "o_orderkey": 4935, "o_custkey": 40 }
+{ "o_orderkey": 4961, "o_custkey": 58 }
+{ "o_orderkey": 4963, "o_custkey": 34 }
+{ "o_orderkey": 4965, "o_custkey": 52 }
+{ "o_orderkey": 4993, "o_custkey": 13 }
+{ "o_orderkey": 4994, "o_custkey": 43 }
+{ "o_orderkey": 4995, "o_custkey": 40 }
+{ "o_orderkey": 4997, "o_custkey": 47 }
+{ "o_orderkey": 4998, "o_custkey": 32 }
+{ "o_orderkey": 5026, "o_custkey": 28 }
+{ "o_orderkey": 5028, "o_custkey": 13 }
+{ "o_orderkey": 5029, "o_custkey": 11 }
+{ "o_orderkey": 5056, "o_custkey": 52 }
+{ "o_orderkey": 5059, "o_custkey": 43 }
+{ "o_orderkey": 5063, "o_custkey": 23 }
+{ "o_orderkey": 5092, "o_custkey": 22 }
+{ "o_orderkey": 5120, "o_custkey": 16 }
+{ "o_orderkey": 5123, "o_custkey": 10 }
+{ "o_orderkey": 5124, "o_custkey": 25 }
+{ "o_orderkey": 5125, "o_custkey": 28 }
+{ "o_orderkey": 5152, "o_custkey": 44 }
+{ "o_orderkey": 5154, "o_custkey": 8 }
+{ "o_orderkey": 5186, "o_custkey": 52 }
+{ "o_orderkey": 5187, "o_custkey": 55 }
+{ "o_orderkey": 5190, "o_custkey": 58 }
+{ "o_orderkey": 5216, "o_custkey": 59 }
+{ "o_orderkey": 5217, "o_custkey": 35 }
+{ "o_orderkey": 5220, "o_custkey": 10 }
+{ "o_orderkey": 5221, "o_custkey": 13 }
+{ "o_orderkey": 5251, "o_custkey": 34 }
+{ "o_orderkey": 5280, "o_custkey": 34 }
+{ "o_orderkey": 5282, "o_custkey": 50 }
+{ "o_orderkey": 5287, "o_custkey": 25 }
+{ "o_orderkey": 5313, "o_custkey": 13 }
+{ "o_orderkey": 5314, "o_custkey": 34 }
+{ "o_orderkey": 5317, "o_custkey": 37 }
+{ "o_orderkey": 5318, "o_custkey": 59 }
+{ "o_orderkey": 5345, "o_custkey": 31 }
+{ "o_orderkey": 5346, "o_custkey": 37 }
+{ "o_orderkey": 5347, "o_custkey": 49 }
+{ "o_orderkey": 5348, "o_custkey": 53 }
+{ "o_orderkey": 5378, "o_custkey": 43 }
+{ "o_orderkey": 5381, "o_custkey": 32 }
+{ "o_orderkey": 5382, "o_custkey": 35 }
+{ "o_orderkey": 5383, "o_custkey": 31 }
+{ "o_orderkey": 5408, "o_custkey": 23 }
+{ "o_orderkey": 5409, "o_custkey": 13 }
+{ "o_orderkey": 5410, "o_custkey": 22 }
+{ "o_orderkey": 5415, "o_custkey": 23 }
+{ "o_orderkey": 5441, "o_custkey": 41 }
+{ "o_orderkey": 5442, "o_custkey": 43 }
+{ "o_orderkey": 5446, "o_custkey": 7 }
+{ "o_orderkey": 5447, "o_custkey": 13 }
+{ "o_orderkey": 5474, "o_custkey": 55 }
+{ "o_orderkey": 5504, "o_custkey": 19 }
+{ "o_orderkey": 5507, "o_custkey": 2 }
+{ "o_orderkey": 5508, "o_custkey": 56 }
+{ "o_orderkey": 5510, "o_custkey": 37 }
+{ "o_orderkey": 5542, "o_custkey": 49 }
+{ "o_orderkey": 5568, "o_custkey": 31 }
+{ "o_orderkey": 5572, "o_custkey": 8 }
+{ "o_orderkey": 5573, "o_custkey": 37 }
+{ "o_orderkey": 5574, "o_custkey": 28 }
+{ "o_orderkey": 5601, "o_custkey": 11 }
+{ "o_orderkey": 5604, "o_custkey": 46 }
+{ "o_orderkey": 5605, "o_custkey": 35 }
+{ "o_orderkey": 5666, "o_custkey": 14 }
+{ "o_orderkey": 5667, "o_custkey": 44 }
+{ "o_orderkey": 5670, "o_custkey": 7 }
+{ "o_orderkey": 5671, "o_custkey": 43 }
+{ "o_orderkey": 5697, "o_custkey": 55 }
+{ "o_orderkey": 5701, "o_custkey": 43 }
+{ "o_orderkey": 5729, "o_custkey": 44 }
+{ "o_orderkey": 5730, "o_custkey": 11 }
+{ "o_orderkey": 5731, "o_custkey": 8 }
+{ "o_orderkey": 5732, "o_custkey": 37 }
+{ "o_orderkey": 5735, "o_custkey": 40 }
+{ "o_orderkey": 5760, "o_custkey": 25 }
+{ "o_orderkey": 5761, "o_custkey": 16 }
+{ "o_orderkey": 5762, "o_custkey": 49 }
+{ "o_orderkey": 5763, "o_custkey": 8 }
+{ "o_orderkey": 5765, "o_custkey": 52 }
+{ "o_orderkey": 5766, "o_custkey": 49 }
+{ "o_orderkey": 5792, "o_custkey": 26 }
+{ "o_orderkey": 5793, "o_custkey": 37 }
+{ "o_orderkey": 5794, "o_custkey": 8 }
+{ "o_orderkey": 5795, "o_custkey": 37 }
+{ "o_orderkey": 5799, "o_custkey": 26 }
+{ "o_orderkey": 5824, "o_custkey": 56 }
+{ "o_orderkey": 5826, "o_custkey": 22 }
+{ "o_orderkey": 5827, "o_custkey": 31 }
+{ "o_orderkey": 5856, "o_custkey": 37 }
+{ "o_orderkey": 5859, "o_custkey": 5 }
+{ "o_orderkey": 5860, "o_custkey": 13 }
+{ "o_orderkey": 5888, "o_custkey": 46 }
+{ "o_orderkey": 5889, "o_custkey": 22 }
+{ "o_orderkey": 5890, "o_custkey": 49 }
+{ "o_orderkey": 5891, "o_custkey": 46 }
+{ "o_orderkey": 5893, "o_custkey": 2 }
+{ "o_orderkey": 5921, "o_custkey": 58 }
+{ "o_orderkey": 5924, "o_custkey": 31 }
+{ "o_orderkey": 5953, "o_custkey": 7 }
+{ "o_orderkey": 5954, "o_custkey": 22 }
+{ "o_orderkey": 5956, "o_custkey": 22 }
+{ "o_orderkey": 5959, "o_custkey": 23 }
+{ "o_orderkey": 5986, "o_custkey": 55 }
+{ "o_orderkey": 5987, "o_custkey": 44 }
+{ "o_orderkey": 5988, "o_custkey": 11 }
+{ "o_orderkey": 10988, "o_custkey": 31 }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/nullable-index/nullable-index.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/nullable-index/nullable-index.1.adm
new file mode 100644
index 0000000..adc9610
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/nullable-index/nullable-index.1.adm
@@ -0,0 +1,2 @@
+{ "cid": 94, "name": "Edgardo Dunnegan", "age": 19, "address": null, "interests": {{ }}, "children": [ { "name": "Lyndia Dunnegan", "age": null } ] }
+{ "cid": 112, "name": "Dorie Love", "age": 12, "address": { "number": 2286, "street": "Lake St.", "city": "Los Angeles" }, "interests": {{ "Coffee" }}, "children": [ { "name": "Grady Lave", "age": null }, { "name": "Daysi Lave", "age": null } ] }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/open-index/open-index.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/open-index/open-index.1.adm
new file mode 100644
index 0000000..a7539e8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/open-index/open-index.1.adm
@@ -0,0 +1,1109 @@
+{ "o_orderkey": 2, "o_custkey": 79 }
+{ "o_orderkey": 3, "o_custkey": 124 }
+{ "o_orderkey": 4, "o_custkey": 137 }
+{ "o_orderkey": 5, "o_custkey": 46 }
+{ "o_orderkey": 6, "o_custkey": 56 }
+{ "o_orderkey": 32, "o_custkey": 131 }
+{ "o_orderkey": 33, "o_custkey": 67 }
+{ "o_orderkey": 34, "o_custkey": 62 }
+{ "o_orderkey": 35, "o_custkey": 128 }
+{ "o_orderkey": 36, "o_custkey": 116 }
+{ "o_orderkey": 37, "o_custkey": 88 }
+{ "o_orderkey": 38, "o_custkey": 125 }
+{ "o_orderkey": 39, "o_custkey": 82 }
+{ "o_orderkey": 66, "o_custkey": 130 }
+{ "o_orderkey": 67, "o_custkey": 58 }
+{ "o_orderkey": 69, "o_custkey": 85 }
+{ "o_orderkey": 70, "o_custkey": 65 }
+{ "o_orderkey": 96, "o_custkey": 109 }
+{ "o_orderkey": 98, "o_custkey": 106 }
+{ "o_orderkey": 99, "o_custkey": 89 }
+{ "o_orderkey": 100, "o_custkey": 148 }
+{ "o_orderkey": 128, "o_custkey": 74 }
+{ "o_orderkey": 129, "o_custkey": 73 }
+{ "o_orderkey": 131, "o_custkey": 94 }
+{ "o_orderkey": 133, "o_custkey": 44 }
+{ "o_orderkey": 135, "o_custkey": 61 }
+{ "o_orderkey": 160, "o_custkey": 83 }
+{ "o_orderkey": 163, "o_custkey": 88 }
+{ "o_orderkey": 166, "o_custkey": 109 }
+{ "o_orderkey": 167, "o_custkey": 121 }
+{ "o_orderkey": 192, "o_custkey": 83 }
+{ "o_orderkey": 193, "o_custkey": 80 }
+{ "o_orderkey": 194, "o_custkey": 62 }
+{ "o_orderkey": 195, "o_custkey": 136 }
+{ "o_orderkey": 196, "o_custkey": 65 }
+{ "o_orderkey": 198, "o_custkey": 112 }
+{ "o_orderkey": 199, "o_custkey": 53 }
+{ "o_orderkey": 226, "o_custkey": 128 }
+{ "o_orderkey": 228, "o_custkey": 46 }
+{ "o_orderkey": 229, "o_custkey": 112 }
+{ "o_orderkey": 230, "o_custkey": 103 }
+{ "o_orderkey": 231, "o_custkey": 91 }
+{ "o_orderkey": 256, "o_custkey": 125 }
+{ "o_orderkey": 257, "o_custkey": 124 }
+{ "o_orderkey": 258, "o_custkey": 43 }
+{ "o_orderkey": 259, "o_custkey": 44 }
+{ "o_orderkey": 260, "o_custkey": 106 }
+{ "o_orderkey": 261, "o_custkey": 47 }
+{ "o_orderkey": 263, "o_custkey": 118 }
+{ "o_orderkey": 289, "o_custkey": 104 }
+{ "o_orderkey": 290, "o_custkey": 118 }
+{ "o_orderkey": 291, "o_custkey": 142 }
+{ "o_orderkey": 294, "o_custkey": 52 }
+{ "o_orderkey": 321, "o_custkey": 124 }
+{ "o_orderkey": 322, "o_custkey": 134 }
+{ "o_orderkey": 324, "o_custkey": 106 }
+{ "o_orderkey": 325, "o_custkey": 41 }
+{ "o_orderkey": 326, "o_custkey": 76 }
+{ "o_orderkey": 327, "o_custkey": 145 }
+{ "o_orderkey": 352, "o_custkey": 107 }
+{ "o_orderkey": 354, "o_custkey": 139 }
+{ "o_orderkey": 355, "o_custkey": 71 }
+{ "o_orderkey": 356, "o_custkey": 148 }
+{ "o_orderkey": 357, "o_custkey": 61 }
+{ "o_orderkey": 359, "o_custkey": 79 }
+{ "o_orderkey": 384, "o_custkey": 115 }
+{ "o_orderkey": 386, "o_custkey": 61 }
+{ "o_orderkey": 388, "o_custkey": 46 }
+{ "o_orderkey": 389, "o_custkey": 127 }
+{ "o_orderkey": 390, "o_custkey": 103 }
+{ "o_orderkey": 391, "o_custkey": 112 }
+{ "o_orderkey": 416, "o_custkey": 41 }
+{ "o_orderkey": 417, "o_custkey": 55 }
+{ "o_orderkey": 418, "o_custkey": 95 }
+{ "o_orderkey": 419, "o_custkey": 118 }
+{ "o_orderkey": 420, "o_custkey": 91 }
+{ "o_orderkey": 422, "o_custkey": 74 }
+{ "o_orderkey": 423, "o_custkey": 104 }
+{ "o_orderkey": 448, "o_custkey": 149 }
+{ "o_orderkey": 449, "o_custkey": 97 }
+{ "o_orderkey": 450, "o_custkey": 49 }
+{ "o_orderkey": 451, "o_custkey": 100 }
+{ "o_orderkey": 452, "o_custkey": 61 }
+{ "o_orderkey": 453, "o_custkey": 46 }
+{ "o_orderkey": 454, "o_custkey": 49 }
+{ "o_orderkey": 480, "o_custkey": 73 }
+{ "o_orderkey": 482, "o_custkey": 127 }
+{ "o_orderkey": 484, "o_custkey": 55 }
+{ "o_orderkey": 485, "o_custkey": 101 }
+{ "o_orderkey": 486, "o_custkey": 52 }
+{ "o_orderkey": 487, "o_custkey": 109 }
+{ "o_orderkey": 512, "o_custkey": 64 }
+{ "o_orderkey": 513, "o_custkey": 61 }
+{ "o_orderkey": 514, "o_custkey": 76 }
+{ "o_orderkey": 515, "o_custkey": 142 }
+{ "o_orderkey": 516, "o_custkey": 44 }
+{ "o_orderkey": 518, "o_custkey": 145 }
+{ "o_orderkey": 519, "o_custkey": 64 }
+{ "o_orderkey": 544, "o_custkey": 94 }
+{ "o_orderkey": 545, "o_custkey": 64 }
+{ "o_orderkey": 546, "o_custkey": 145 }
+{ "o_orderkey": 547, "o_custkey": 100 }
+{ "o_orderkey": 548, "o_custkey": 124 }
+{ "o_orderkey": 549, "o_custkey": 110 }
+{ "o_orderkey": 551, "o_custkey": 91 }
+{ "o_orderkey": 577, "o_custkey": 56 }
+{ "o_orderkey": 578, "o_custkey": 94 }
+{ "o_orderkey": 579, "o_custkey": 68 }
+{ "o_orderkey": 580, "o_custkey": 61 }
+{ "o_orderkey": 581, "o_custkey": 70 }
+{ "o_orderkey": 582, "o_custkey": 50 }
+{ "o_orderkey": 583, "o_custkey": 49 }
+{ "o_orderkey": 609, "o_custkey": 127 }
+{ "o_orderkey": 610, "o_custkey": 52 }
+{ "o_orderkey": 611, "o_custkey": 106 }
+{ "o_orderkey": 612, "o_custkey": 82 }
+{ "o_orderkey": 613, "o_custkey": 139 }
+{ "o_orderkey": 614, "o_custkey": 134 }
+{ "o_orderkey": 615, "o_custkey": 67 }
+{ "o_orderkey": 640, "o_custkey": 97 }
+{ "o_orderkey": 641, "o_custkey": 133 }
+{ "o_orderkey": 643, "o_custkey": 58 }
+{ "o_orderkey": 645, "o_custkey": 115 }
+{ "o_orderkey": 646, "o_custkey": 52 }
+{ "o_orderkey": 647, "o_custkey": 143 }
+{ "o_orderkey": 672, "o_custkey": 109 }
+{ "o_orderkey": 673, "o_custkey": 80 }
+{ "o_orderkey": 677, "o_custkey": 124 }
+{ "o_orderkey": 678, "o_custkey": 131 }
+{ "o_orderkey": 679, "o_custkey": 49 }
+{ "o_orderkey": 704, "o_custkey": 85 }
+{ "o_orderkey": 705, "o_custkey": 43 }
+{ "o_orderkey": 706, "o_custkey": 148 }
+{ "o_orderkey": 707, "o_custkey": 118 }
+{ "o_orderkey": 710, "o_custkey": 133 }
+{ "o_orderkey": 711, "o_custkey": 64 }
+{ "o_orderkey": 736, "o_custkey": 47 }
+{ "o_orderkey": 737, "o_custkey": 121 }
+{ "o_orderkey": 740, "o_custkey": 44 }
+{ "o_orderkey": 741, "o_custkey": 106 }
+{ "o_orderkey": 742, "o_custkey": 103 }
+{ "o_orderkey": 743, "o_custkey": 79 }
+{ "o_orderkey": 768, "o_custkey": 98 }
+{ "o_orderkey": 769, "o_custkey": 80 }
+{ "o_orderkey": 771, "o_custkey": 46 }
+{ "o_orderkey": 772, "o_custkey": 97 }
+{ "o_orderkey": 773, "o_custkey": 133 }
+{ "o_orderkey": 774, "o_custkey": 80 }
+{ "o_orderkey": 775, "o_custkey": 134 }
+{ "o_orderkey": 800, "o_custkey": 56 }
+{ "o_orderkey": 801, "o_custkey": 118 }
+{ "o_orderkey": 802, "o_custkey": 137 }
+{ "o_orderkey": 804, "o_custkey": 50 }
+{ "o_orderkey": 805, "o_custkey": 127 }
+{ "o_orderkey": 806, "o_custkey": 131 }
+{ "o_orderkey": 807, "o_custkey": 145 }
+{ "o_orderkey": 833, "o_custkey": 56 }
+{ "o_orderkey": 834, "o_custkey": 43 }
+{ "o_orderkey": 835, "o_custkey": 65 }
+{ "o_orderkey": 836, "o_custkey": 70 }
+{ "o_orderkey": 837, "o_custkey": 116 }
+{ "o_orderkey": 864, "o_custkey": 139 }
+{ "o_orderkey": 868, "o_custkey": 104 }
+{ "o_orderkey": 869, "o_custkey": 136 }
+{ "o_orderkey": 897, "o_custkey": 49 }
+{ "o_orderkey": 898, "o_custkey": 55 }
+{ "o_orderkey": 899, "o_custkey": 109 }
+{ "o_orderkey": 900, "o_custkey": 46 }
+{ "o_orderkey": 928, "o_custkey": 67 }
+{ "o_orderkey": 929, "o_custkey": 83 }
+{ "o_orderkey": 930, "o_custkey": 131 }
+{ "o_orderkey": 931, "o_custkey": 103 }
+{ "o_orderkey": 932, "o_custkey": 41 }
+{ "o_orderkey": 933, "o_custkey": 97 }
+{ "o_orderkey": 934, "o_custkey": 52 }
+{ "o_orderkey": 935, "o_custkey": 50 }
+{ "o_orderkey": 961, "o_custkey": 56 }
+{ "o_orderkey": 964, "o_custkey": 76 }
+{ "o_orderkey": 965, "o_custkey": 70 }
+{ "o_orderkey": 967, "o_custkey": 110 }
+{ "o_orderkey": 992, "o_custkey": 55 }
+{ "o_orderkey": 993, "o_custkey": 80 }
+{ "o_orderkey": 995, "o_custkey": 116 }
+{ "o_orderkey": 996, "o_custkey": 71 }
+{ "o_orderkey": 997, "o_custkey": 109 }
+{ "o_orderkey": 999, "o_custkey": 61 }
+{ "o_orderkey": 1025, "o_custkey": 103 }
+{ "o_orderkey": 1026, "o_custkey": 73 }
+{ "o_orderkey": 1027, "o_custkey": 128 }
+{ "o_orderkey": 1028, "o_custkey": 70 }
+{ "o_orderkey": 1029, "o_custkey": 130 }
+{ "o_orderkey": 1030, "o_custkey": 134 }
+{ "o_orderkey": 1057, "o_custkey": 76 }
+{ "o_orderkey": 1058, "o_custkey": 53 }
+{ "o_orderkey": 1059, "o_custkey": 127 }
+{ "o_orderkey": 1060, "o_custkey": 140 }
+{ "o_orderkey": 1061, "o_custkey": 103 }
+{ "o_orderkey": 1062, "o_custkey": 106 }
+{ "o_orderkey": 1088, "o_custkey": 148 }
+{ "o_orderkey": 1089, "o_custkey": 49 }
+{ "o_orderkey": 1091, "o_custkey": 83 }
+{ "o_orderkey": 1092, "o_custkey": 124 }
+{ "o_orderkey": 1093, "o_custkey": 101 }
+{ "o_orderkey": 1094, "o_custkey": 145 }
+{ "o_orderkey": 1095, "o_custkey": 145 }
+{ "o_orderkey": 1120, "o_custkey": 140 }
+{ "o_orderkey": 1122, "o_custkey": 121 }
+{ "o_orderkey": 1123, "o_custkey": 73 }
+{ "o_orderkey": 1124, "o_custkey": 80 }
+{ "o_orderkey": 1126, "o_custkey": 145 }
+{ "o_orderkey": 1127, "o_custkey": 58 }
+{ "o_orderkey": 1152, "o_custkey": 49 }
+{ "o_orderkey": 1153, "o_custkey": 121 }
+{ "o_orderkey": 1155, "o_custkey": 149 }
+{ "o_orderkey": 1156, "o_custkey": 133 }
+{ "o_orderkey": 1157, "o_custkey": 97 }
+{ "o_orderkey": 1158, "o_custkey": 142 }
+{ "o_orderkey": 1159, "o_custkey": 70 }
+{ "o_orderkey": 1184, "o_custkey": 89 }
+{ "o_orderkey": 1185, "o_custkey": 74 }
+{ "o_orderkey": 1186, "o_custkey": 59 }
+{ "o_orderkey": 1187, "o_custkey": 134 }
+{ "o_orderkey": 1189, "o_custkey": 46 }
+{ "o_orderkey": 1191, "o_custkey": 112 }
+{ "o_orderkey": 1216, "o_custkey": 122 }
+{ "o_orderkey": 1220, "o_custkey": 49 }
+{ "o_orderkey": 1248, "o_custkey": 49 }
+{ "o_orderkey": 1249, "o_custkey": 149 }
+{ "o_orderkey": 1252, "o_custkey": 149 }
+{ "o_orderkey": 1253, "o_custkey": 115 }
+{ "o_orderkey": 1254, "o_custkey": 70 }
+{ "o_orderkey": 1255, "o_custkey": 122 }
+{ "o_orderkey": 1280, "o_custkey": 97 }
+{ "o_orderkey": 1281, "o_custkey": 62 }
+{ "o_orderkey": 1282, "o_custkey": 116 }
+{ "o_orderkey": 1283, "o_custkey": 118 }
+{ "o_orderkey": 1284, "o_custkey": 134 }
+{ "o_orderkey": 1286, "o_custkey": 109 }
+{ "o_orderkey": 1312, "o_custkey": 112 }
+{ "o_orderkey": 1313, "o_custkey": 148 }
+{ "o_orderkey": 1314, "o_custkey": 143 }
+{ "o_orderkey": 1317, "o_custkey": 100 }
+{ "o_orderkey": 1318, "o_custkey": 128 }
+{ "o_orderkey": 1345, "o_custkey": 95 }
+{ "o_orderkey": 1346, "o_custkey": 76 }
+{ "o_orderkey": 1347, "o_custkey": 41 }
+{ "o_orderkey": 1349, "o_custkey": 64 }
+{ "o_orderkey": 1350, "o_custkey": 52 }
+{ "o_orderkey": 1351, "o_custkey": 106 }
+{ "o_orderkey": 1376, "o_custkey": 47 }
+{ "o_orderkey": 1379, "o_custkey": 65 }
+{ "o_orderkey": 1380, "o_custkey": 137 }
+{ "o_orderkey": 1381, "o_custkey": 127 }
+{ "o_orderkey": 1382, "o_custkey": 133 }
+{ "o_orderkey": 1383, "o_custkey": 121 }
+{ "o_orderkey": 1408, "o_custkey": 55 }
+{ "o_orderkey": 1409, "o_custkey": 143 }
+{ "o_orderkey": 1410, "o_custkey": 113 }
+{ "o_orderkey": 1411, "o_custkey": 95 }
+{ "o_orderkey": 1412, "o_custkey": 53 }
+{ "o_orderkey": 1413, "o_custkey": 91 }
+{ "o_orderkey": 1414, "o_custkey": 77 }
+{ "o_orderkey": 1415, "o_custkey": 79 }
+{ "o_orderkey": 1440, "o_custkey": 98 }
+{ "o_orderkey": 1441, "o_custkey": 122 }
+{ "o_orderkey": 1442, "o_custkey": 112 }
+{ "o_orderkey": 1443, "o_custkey": 44 }
+{ "o_orderkey": 1444, "o_custkey": 134 }
+{ "o_orderkey": 1445, "o_custkey": 115 }
+{ "o_orderkey": 1446, "o_custkey": 41 }
+{ "o_orderkey": 1447, "o_custkey": 91 }
+{ "o_orderkey": 1472, "o_custkey": 149 }
+{ "o_orderkey": 1473, "o_custkey": 94 }
+{ "o_orderkey": 1474, "o_custkey": 70 }
+{ "o_orderkey": 1476, "o_custkey": 145 }
+{ "o_orderkey": 1477, "o_custkey": 76 }
+{ "o_orderkey": 1478, "o_custkey": 50 }
+{ "o_orderkey": 1506, "o_custkey": 148 }
+{ "o_orderkey": 1507, "o_custkey": 121 }
+{ "o_orderkey": 1508, "o_custkey": 103 }
+{ "o_orderkey": 1509, "o_custkey": 64 }
+{ "o_orderkey": 1510, "o_custkey": 53 }
+{ "o_orderkey": 1511, "o_custkey": 79 }
+{ "o_orderkey": 1536, "o_custkey": 94 }
+{ "o_orderkey": 1537, "o_custkey": 109 }
+{ "o_orderkey": 1539, "o_custkey": 112 }
+{ "o_orderkey": 1541, "o_custkey": 94 }
+{ "o_orderkey": 1542, "o_custkey": 143 }
+{ "o_orderkey": 1543, "o_custkey": 52 }
+{ "o_orderkey": 1569, "o_custkey": 104 }
+{ "o_orderkey": 1570, "o_custkey": 124 }
+{ "o_orderkey": 1571, "o_custkey": 103 }
+{ "o_orderkey": 1573, "o_custkey": 148 }
+{ "o_orderkey": 1574, "o_custkey": 134 }
+{ "o_orderkey": 1575, "o_custkey": 145 }
+{ "o_orderkey": 1600, "o_custkey": 94 }
+{ "o_orderkey": 1601, "o_custkey": 53 }
+{ "o_orderkey": 1604, "o_custkey": 113 }
+{ "o_orderkey": 1605, "o_custkey": 58 }
+{ "o_orderkey": 1606, "o_custkey": 53 }
+{ "o_orderkey": 1607, "o_custkey": 149 }
+{ "o_orderkey": 1632, "o_custkey": 67 }
+{ "o_orderkey": 1634, "o_custkey": 70 }
+{ "o_orderkey": 1636, "o_custkey": 79 }
+{ "o_orderkey": 1637, "o_custkey": 73 }
+{ "o_orderkey": 1638, "o_custkey": 139 }
+{ "o_orderkey": 1664, "o_custkey": 64 }
+{ "o_orderkey": 1665, "o_custkey": 76 }
+{ "o_orderkey": 1666, "o_custkey": 95 }
+{ "o_orderkey": 1668, "o_custkey": 142 }
+{ "o_orderkey": 1697, "o_custkey": 76 }
+{ "o_orderkey": 1699, "o_custkey": 85 }
+{ "o_orderkey": 1700, "o_custkey": 65 }
+{ "o_orderkey": 1701, "o_custkey": 130 }
+{ "o_orderkey": 1702, "o_custkey": 67 }
+{ "o_orderkey": 1703, "o_custkey": 134 }
+{ "o_orderkey": 1728, "o_custkey": 64 }
+{ "o_orderkey": 1729, "o_custkey": 133 }
+{ "o_orderkey": 1730, "o_custkey": 124 }
+{ "o_orderkey": 1731, "o_custkey": 128 }
+{ "o_orderkey": 1732, "o_custkey": 146 }
+{ "o_orderkey": 1733, "o_custkey": 148 }
+{ "o_orderkey": 1760, "o_custkey": 115 }
+{ "o_orderkey": 1761, "o_custkey": 106 }
+{ "o_orderkey": 1762, "o_custkey": 77 }
+{ "o_orderkey": 1763, "o_custkey": 121 }
+{ "o_orderkey": 1765, "o_custkey": 73 }
+{ "o_orderkey": 1766, "o_custkey": 139 }
+{ "o_orderkey": 1792, "o_custkey": 49 }
+{ "o_orderkey": 1794, "o_custkey": 140 }
+{ "o_orderkey": 1795, "o_custkey": 94 }
+{ "o_orderkey": 1796, "o_custkey": 47 }
+{ "o_orderkey": 1797, "o_custkey": 125 }
+{ "o_orderkey": 1798, "o_custkey": 52 }
+{ "o_orderkey": 1799, "o_custkey": 61 }
+{ "o_orderkey": 1824, "o_custkey": 49 }
+{ "o_orderkey": 1825, "o_custkey": 148 }
+{ "o_orderkey": 1826, "o_custkey": 82 }
+{ "o_orderkey": 1827, "o_custkey": 106 }
+{ "o_orderkey": 1829, "o_custkey": 112 }
+{ "o_orderkey": 1830, "o_custkey": 133 }
+{ "o_orderkey": 1831, "o_custkey": 71 }
+{ "o_orderkey": 1856, "o_custkey": 106 }
+{ "o_orderkey": 1857, "o_custkey": 133 }
+{ "o_orderkey": 1858, "o_custkey": 143 }
+{ "o_orderkey": 1859, "o_custkey": 61 }
+{ "o_orderkey": 1861, "o_custkey": 70 }
+{ "o_orderkey": 1863, "o_custkey": 74 }
+{ "o_orderkey": 1888, "o_custkey": 121 }
+{ "o_orderkey": 1891, "o_custkey": 61 }
+{ "o_orderkey": 1893, "o_custkey": 125 }
+{ "o_orderkey": 1894, "o_custkey": 76 }
+{ "o_orderkey": 1920, "o_custkey": 110 }
+{ "o_orderkey": 1921, "o_custkey": 88 }
+{ "o_orderkey": 1922, "o_custkey": 56 }
+{ "o_orderkey": 1923, "o_custkey": 136 }
+{ "o_orderkey": 1924, "o_custkey": 76 }
+{ "o_orderkey": 1926, "o_custkey": 94 }
+{ "o_orderkey": 1927, "o_custkey": 140 }
+{ "o_orderkey": 1952, "o_custkey": 67 }
+{ "o_orderkey": 1953, "o_custkey": 149 }
+{ "o_orderkey": 1954, "o_custkey": 56 }
+{ "o_orderkey": 1956, "o_custkey": 127 }
+{ "o_orderkey": 1958, "o_custkey": 53 }
+{ "o_orderkey": 1959, "o_custkey": 43 }
+{ "o_orderkey": 1984, "o_custkey": 52 }
+{ "o_orderkey": 1986, "o_custkey": 149 }
+{ "o_orderkey": 1987, "o_custkey": 100 }
+{ "o_orderkey": 1988, "o_custkey": 109 }
+{ "o_orderkey": 1989, "o_custkey": 118 }
+{ "o_orderkey": 1990, "o_custkey": 119 }
+{ "o_orderkey": 2017, "o_custkey": 101 }
+{ "o_orderkey": 2019, "o_custkey": 136 }
+{ "o_orderkey": 2020, "o_custkey": 73 }
+{ "o_orderkey": 2021, "o_custkey": 70 }
+{ "o_orderkey": 2022, "o_custkey": 62 }
+{ "o_orderkey": 2023, "o_custkey": 118 }
+{ "o_orderkey": 2052, "o_custkey": 91 }
+{ "o_orderkey": 2053, "o_custkey": 142 }
+{ "o_orderkey": 2054, "o_custkey": 41 }
+{ "o_orderkey": 2055, "o_custkey": 97 }
+{ "o_orderkey": 2080, "o_custkey": 95 }
+{ "o_orderkey": 2081, "o_custkey": 121 }
+{ "o_orderkey": 2082, "o_custkey": 49 }
+{ "o_orderkey": 2083, "o_custkey": 101 }
+{ "o_orderkey": 2084, "o_custkey": 80 }
+{ "o_orderkey": 2085, "o_custkey": 49 }
+{ "o_orderkey": 2086, "o_custkey": 142 }
+{ "o_orderkey": 2087, "o_custkey": 50 }
+{ "o_orderkey": 2112, "o_custkey": 64 }
+{ "o_orderkey": 2114, "o_custkey": 79 }
+{ "o_orderkey": 2115, "o_custkey": 106 }
+{ "o_orderkey": 2118, "o_custkey": 134 }
+{ "o_orderkey": 2119, "o_custkey": 64 }
+{ "o_orderkey": 2144, "o_custkey": 136 }
+{ "o_orderkey": 2145, "o_custkey": 134 }
+{ "o_orderkey": 2146, "o_custkey": 118 }
+{ "o_orderkey": 2147, "o_custkey": 100 }
+{ "o_orderkey": 2148, "o_custkey": 130 }
+{ "o_orderkey": 2149, "o_custkey": 101 }
+{ "o_orderkey": 2150, "o_custkey": 82 }
+{ "o_orderkey": 2151, "o_custkey": 58 }
+{ "o_orderkey": 2176, "o_custkey": 104 }
+{ "o_orderkey": 2177, "o_custkey": 136 }
+{ "o_orderkey": 2179, "o_custkey": 41 }
+{ "o_orderkey": 2180, "o_custkey": 76 }
+{ "o_orderkey": 2181, "o_custkey": 76 }
+{ "o_orderkey": 2183, "o_custkey": 113 }
+{ "o_orderkey": 2208, "o_custkey": 68 }
+{ "o_orderkey": 2209, "o_custkey": 91 }
+{ "o_orderkey": 2211, "o_custkey": 92 }
+{ "o_orderkey": 2212, "o_custkey": 118 }
+{ "o_orderkey": 2213, "o_custkey": 122 }
+{ "o_orderkey": 2214, "o_custkey": 115 }
+{ "o_orderkey": 2240, "o_custkey": 56 }
+{ "o_orderkey": 2241, "o_custkey": 103 }
+{ "o_orderkey": 2242, "o_custkey": 82 }
+{ "o_orderkey": 2243, "o_custkey": 49 }
+{ "o_orderkey": 2244, "o_custkey": 127 }
+{ "o_orderkey": 2245, "o_custkey": 58 }
+{ "o_orderkey": 2246, "o_custkey": 113 }
+{ "o_orderkey": 2247, "o_custkey": 95 }
+{ "o_orderkey": 2272, "o_custkey": 139 }
+{ "o_orderkey": 2273, "o_custkey": 136 }
+{ "o_orderkey": 2274, "o_custkey": 104 }
+{ "o_orderkey": 2275, "o_custkey": 149 }
+{ "o_orderkey": 2276, "o_custkey": 43 }
+{ "o_orderkey": 2277, "o_custkey": 89 }
+{ "o_orderkey": 2278, "o_custkey": 142 }
+{ "o_orderkey": 2279, "o_custkey": 80 }
+{ "o_orderkey": 2304, "o_custkey": 46 }
+{ "o_orderkey": 2305, "o_custkey": 43 }
+{ "o_orderkey": 2307, "o_custkey": 106 }
+{ "o_orderkey": 2309, "o_custkey": 100 }
+{ "o_orderkey": 2311, "o_custkey": 73 }
+{ "o_orderkey": 2336, "o_custkey": 142 }
+{ "o_orderkey": 2337, "o_custkey": 142 }
+{ "o_orderkey": 2338, "o_custkey": 140 }
+{ "o_orderkey": 2339, "o_custkey": 109 }
+{ "o_orderkey": 2340, "o_custkey": 65 }
+{ "o_orderkey": 2341, "o_custkey": 82 }
+{ "o_orderkey": 2343, "o_custkey": 73 }
+{ "o_orderkey": 2369, "o_custkey": 110 }
+{ "o_orderkey": 2370, "o_custkey": 142 }
+{ "o_orderkey": 2401, "o_custkey": 148 }
+{ "o_orderkey": 2402, "o_custkey": 67 }
+{ "o_orderkey": 2403, "o_custkey": 55 }
+{ "o_orderkey": 2404, "o_custkey": 77 }
+{ "o_orderkey": 2405, "o_custkey": 73 }
+{ "o_orderkey": 2407, "o_custkey": 55 }
+{ "o_orderkey": 2432, "o_custkey": 103 }
+{ "o_orderkey": 2435, "o_custkey": 73 }
+{ "o_orderkey": 2436, "o_custkey": 125 }
+{ "o_orderkey": 2437, "o_custkey": 85 }
+{ "o_orderkey": 2439, "o_custkey": 55 }
+{ "o_orderkey": 2464, "o_custkey": 145 }
+{ "o_orderkey": 2468, "o_custkey": 112 }
+{ "o_orderkey": 2469, "o_custkey": 124 }
+{ "o_orderkey": 2470, "o_custkey": 58 }
+{ "o_orderkey": 2471, "o_custkey": 89 }
+{ "o_orderkey": 2496, "o_custkey": 136 }
+{ "o_orderkey": 2497, "o_custkey": 47 }
+{ "o_orderkey": 2498, "o_custkey": 97 }
+{ "o_orderkey": 2499, "o_custkey": 121 }
+{ "o_orderkey": 2500, "o_custkey": 133 }
+{ "o_orderkey": 2501, "o_custkey": 67 }
+{ "o_orderkey": 2502, "o_custkey": 70 }
+{ "o_orderkey": 2528, "o_custkey": 55 }
+{ "o_orderkey": 2529, "o_custkey": 136 }
+{ "o_orderkey": 2530, "o_custkey": 128 }
+{ "o_orderkey": 2531, "o_custkey": 44 }
+{ "o_orderkey": 2532, "o_custkey": 94 }
+{ "o_orderkey": 2533, "o_custkey": 50 }
+{ "o_orderkey": 2534, "o_custkey": 76 }
+{ "o_orderkey": 2535, "o_custkey": 121 }
+{ "o_orderkey": 2560, "o_custkey": 131 }
+{ "o_orderkey": 2561, "o_custkey": 58 }
+{ "o_orderkey": 2563, "o_custkey": 62 }
+{ "o_orderkey": 2564, "o_custkey": 77 }
+{ "o_orderkey": 2565, "o_custkey": 56 }
+{ "o_orderkey": 2566, "o_custkey": 86 }
+{ "o_orderkey": 2567, "o_custkey": 70 }
+{ "o_orderkey": 2592, "o_custkey": 101 }
+{ "o_orderkey": 2593, "o_custkey": 92 }
+{ "o_orderkey": 2594, "o_custkey": 79 }
+{ "o_orderkey": 2595, "o_custkey": 74 }
+{ "o_orderkey": 2596, "o_custkey": 43 }
+{ "o_orderkey": 2597, "o_custkey": 104 }
+{ "o_orderkey": 2598, "o_custkey": 112 }
+{ "o_orderkey": 2599, "o_custkey": 149 }
+{ "o_orderkey": 2624, "o_custkey": 52 }
+{ "o_orderkey": 2626, "o_custkey": 139 }
+{ "o_orderkey": 2627, "o_custkey": 149 }
+{ "o_orderkey": 2628, "o_custkey": 56 }
+{ "o_orderkey": 2629, "o_custkey": 139 }
+{ "o_orderkey": 2630, "o_custkey": 85 }
+{ "o_orderkey": 2656, "o_custkey": 77 }
+{ "o_orderkey": 2659, "o_custkey": 83 }
+{ "o_orderkey": 2660, "o_custkey": 127 }
+{ "o_orderkey": 2661, "o_custkey": 74 }
+{ "o_orderkey": 2663, "o_custkey": 95 }
+{ "o_orderkey": 2688, "o_custkey": 98 }
+{ "o_orderkey": 2689, "o_custkey": 103 }
+{ "o_orderkey": 2690, "o_custkey": 94 }
+{ "o_orderkey": 2692, "o_custkey": 62 }
+{ "o_orderkey": 2694, "o_custkey": 121 }
+{ "o_orderkey": 2695, "o_custkey": 58 }
+{ "o_orderkey": 2721, "o_custkey": 79 }
+{ "o_orderkey": 2723, "o_custkey": 61 }
+{ "o_orderkey": 2724, "o_custkey": 137 }
+{ "o_orderkey": 2725, "o_custkey": 89 }
+{ "o_orderkey": 2727, "o_custkey": 74 }
+{ "o_orderkey": 2752, "o_custkey": 59 }
+{ "o_orderkey": 2754, "o_custkey": 145 }
+{ "o_orderkey": 2755, "o_custkey": 118 }
+{ "o_orderkey": 2756, "o_custkey": 118 }
+{ "o_orderkey": 2757, "o_custkey": 76 }
+{ "o_orderkey": 2758, "o_custkey": 43 }
+{ "o_orderkey": 2759, "o_custkey": 116 }
+{ "o_orderkey": 2784, "o_custkey": 95 }
+{ "o_orderkey": 2785, "o_custkey": 148 }
+{ "o_orderkey": 2786, "o_custkey": 79 }
+{ "o_orderkey": 2787, "o_custkey": 103 }
+{ "o_orderkey": 2788, "o_custkey": 124 }
+{ "o_orderkey": 2791, "o_custkey": 121 }
+{ "o_orderkey": 2816, "o_custkey": 58 }
+{ "o_orderkey": 2818, "o_custkey": 49 }
+{ "o_orderkey": 2819, "o_custkey": 103 }
+{ "o_orderkey": 2821, "o_custkey": 118 }
+{ "o_orderkey": 2822, "o_custkey": 79 }
+{ "o_orderkey": 2823, "o_custkey": 79 }
+{ "o_orderkey": 2848, "o_custkey": 70 }
+{ "o_orderkey": 2849, "o_custkey": 46 }
+{ "o_orderkey": 2850, "o_custkey": 100 }
+{ "o_orderkey": 2851, "o_custkey": 145 }
+{ "o_orderkey": 2852, "o_custkey": 91 }
+{ "o_orderkey": 2853, "o_custkey": 94 }
+{ "o_orderkey": 2854, "o_custkey": 139 }
+{ "o_orderkey": 2855, "o_custkey": 49 }
+{ "o_orderkey": 2881, "o_custkey": 100 }
+{ "o_orderkey": 2882, "o_custkey": 121 }
+{ "o_orderkey": 2883, "o_custkey": 121 }
+{ "o_orderkey": 2884, "o_custkey": 92 }
+{ "o_orderkey": 2886, "o_custkey": 109 }
+{ "o_orderkey": 2887, "o_custkey": 109 }
+{ "o_orderkey": 2912, "o_custkey": 94 }
+{ "o_orderkey": 2913, "o_custkey": 43 }
+{ "o_orderkey": 2914, "o_custkey": 109 }
+{ "o_orderkey": 2915, "o_custkey": 94 }
+{ "o_orderkey": 2917, "o_custkey": 91 }
+{ "o_orderkey": 2918, "o_custkey": 118 }
+{ "o_orderkey": 2919, "o_custkey": 53 }
+{ "o_orderkey": 2946, "o_custkey": 125 }
+{ "o_orderkey": 2947, "o_custkey": 70 }
+{ "o_orderkey": 2948, "o_custkey": 44 }
+{ "o_orderkey": 2949, "o_custkey": 137 }
+{ "o_orderkey": 2950, "o_custkey": 136 }
+{ "o_orderkey": 2951, "o_custkey": 74 }
+{ "o_orderkey": 2977, "o_custkey": 73 }
+{ "o_orderkey": 2978, "o_custkey": 44 }
+{ "o_orderkey": 2979, "o_custkey": 133 }
+{ "o_orderkey": 2981, "o_custkey": 49 }
+{ "o_orderkey": 2982, "o_custkey": 85 }
+{ "o_orderkey": 2983, "o_custkey": 62 }
+{ "o_orderkey": 3009, "o_custkey": 55 }
+{ "o_orderkey": 3011, "o_custkey": 91 }
+{ "o_orderkey": 3013, "o_custkey": 143 }
+{ "o_orderkey": 3015, "o_custkey": 103 }
+{ "o_orderkey": 3040, "o_custkey": 112 }
+{ "o_orderkey": 3041, "o_custkey": 113 }
+{ "o_orderkey": 3043, "o_custkey": 44 }
+{ "o_orderkey": 3044, "o_custkey": 53 }
+{ "o_orderkey": 3045, "o_custkey": 50 }
+{ "o_orderkey": 3073, "o_custkey": 136 }
+{ "o_orderkey": 3074, "o_custkey": 67 }
+{ "o_orderkey": 3075, "o_custkey": 127 }
+{ "o_orderkey": 3076, "o_custkey": 92 }
+{ "o_orderkey": 3077, "o_custkey": 121 }
+{ "o_orderkey": 3078, "o_custkey": 49 }
+{ "o_orderkey": 3079, "o_custkey": 100 }
+{ "o_orderkey": 3104, "o_custkey": 70 }
+{ "o_orderkey": 3105, "o_custkey": 137 }
+{ "o_orderkey": 3106, "o_custkey": 145 }
+{ "o_orderkey": 3108, "o_custkey": 85 }
+{ "o_orderkey": 3109, "o_custkey": 124 }
+{ "o_orderkey": 3110, "o_custkey": 88 }
+{ "o_orderkey": 3111, "o_custkey": 133 }
+{ "o_orderkey": 3137, "o_custkey": 136 }
+{ "o_orderkey": 3138, "o_custkey": 139 }
+{ "o_orderkey": 3140, "o_custkey": 145 }
+{ "o_orderkey": 3143, "o_custkey": 107 }
+{ "o_orderkey": 3168, "o_custkey": 136 }
+{ "o_orderkey": 3171, "o_custkey": 47 }
+{ "o_orderkey": 3172, "o_custkey": 89 }
+{ "o_orderkey": 3173, "o_custkey": 148 }
+{ "o_orderkey": 3174, "o_custkey": 127 }
+{ "o_orderkey": 3175, "o_custkey": 44 }
+{ "o_orderkey": 3201, "o_custkey": 97 }
+{ "o_orderkey": 3202, "o_custkey": 88 }
+{ "o_orderkey": 3203, "o_custkey": 127 }
+{ "o_orderkey": 3205, "o_custkey": 148 }
+{ "o_orderkey": 3206, "o_custkey": 122 }
+{ "o_orderkey": 3232, "o_custkey": 82 }
+{ "o_orderkey": 3233, "o_custkey": 140 }
+{ "o_orderkey": 3235, "o_custkey": 46 }
+{ "o_orderkey": 3236, "o_custkey": 142 }
+{ "o_orderkey": 3238, "o_custkey": 61 }
+{ "o_orderkey": 3264, "o_custkey": 94 }
+{ "o_orderkey": 3265, "o_custkey": 53 }
+{ "o_orderkey": 3267, "o_custkey": 112 }
+{ "o_orderkey": 3268, "o_custkey": 142 }
+{ "o_orderkey": 3296, "o_custkey": 148 }
+{ "o_orderkey": 3297, "o_custkey": 139 }
+{ "o_orderkey": 3298, "o_custkey": 116 }
+{ "o_orderkey": 3299, "o_custkey": 91 }
+{ "o_orderkey": 3300, "o_custkey": 118 }
+{ "o_orderkey": 3301, "o_custkey": 133 }
+{ "o_orderkey": 3303, "o_custkey": 145 }
+{ "o_orderkey": 3331, "o_custkey": 91 }
+{ "o_orderkey": 3332, "o_custkey": 143 }
+{ "o_orderkey": 3333, "o_custkey": 92 }
+{ "o_orderkey": 3334, "o_custkey": 76 }
+{ "o_orderkey": 3335, "o_custkey": 49 }
+{ "o_orderkey": 3360, "o_custkey": 103 }
+{ "o_orderkey": 3361, "o_custkey": 49 }
+{ "o_orderkey": 3362, "o_custkey": 140 }
+{ "o_orderkey": 3363, "o_custkey": 52 }
+{ "o_orderkey": 3364, "o_custkey": 46 }
+{ "o_orderkey": 3365, "o_custkey": 82 }
+{ "o_orderkey": 3366, "o_custkey": 52 }
+{ "o_orderkey": 3367, "o_custkey": 73 }
+{ "o_orderkey": 3392, "o_custkey": 74 }
+{ "o_orderkey": 3393, "o_custkey": 98 }
+{ "o_orderkey": 3394, "o_custkey": 149 }
+{ "o_orderkey": 3395, "o_custkey": 149 }
+{ "o_orderkey": 3396, "o_custkey": 149 }
+{ "o_orderkey": 3397, "o_custkey": 130 }
+{ "o_orderkey": 3398, "o_custkey": 67 }
+{ "o_orderkey": 3399, "o_custkey": 122 }
+{ "o_orderkey": 3424, "o_custkey": 103 }
+{ "o_orderkey": 3425, "o_custkey": 115 }
+{ "o_orderkey": 3426, "o_custkey": 53 }
+{ "o_orderkey": 3429, "o_custkey": 146 }
+{ "o_orderkey": 3430, "o_custkey": 113 }
+{ "o_orderkey": 3431, "o_custkey": 47 }
+{ "o_orderkey": 3456, "o_custkey": 46 }
+{ "o_orderkey": 3458, "o_custkey": 95 }
+{ "o_orderkey": 3459, "o_custkey": 119 }
+{ "o_orderkey": 3460, "o_custkey": 82 }
+{ "o_orderkey": 3461, "o_custkey": 100 }
+{ "o_orderkey": 3462, "o_custkey": 133 }
+{ "o_orderkey": 3463, "o_custkey": 89 }
+{ "o_orderkey": 3488, "o_custkey": 148 }
+{ "o_orderkey": 3489, "o_custkey": 109 }
+{ "o_orderkey": 3490, "o_custkey": 91 }
+{ "o_orderkey": 3491, "o_custkey": 83 }
+{ "o_orderkey": 3492, "o_custkey": 103 }
+{ "o_orderkey": 3493, "o_custkey": 82 }
+{ "o_orderkey": 3494, "o_custkey": 49 }
+{ "o_orderkey": 3520, "o_custkey": 125 }
+{ "o_orderkey": 3523, "o_custkey": 149 }
+{ "o_orderkey": 3524, "o_custkey": 94 }
+{ "o_orderkey": 3525, "o_custkey": 109 }
+{ "o_orderkey": 3526, "o_custkey": 56 }
+{ "o_orderkey": 3527, "o_custkey": 56 }
+{ "o_orderkey": 3553, "o_custkey": 91 }
+{ "o_orderkey": 3554, "o_custkey": 44 }
+{ "o_orderkey": 3555, "o_custkey": 46 }
+{ "o_orderkey": 3557, "o_custkey": 121 }
+{ "o_orderkey": 3559, "o_custkey": 106 }
+{ "o_orderkey": 3585, "o_custkey": 139 }
+{ "o_orderkey": 3586, "o_custkey": 121 }
+{ "o_orderkey": 3587, "o_custkey": 79 }
+{ "o_orderkey": 3588, "o_custkey": 119 }
+{ "o_orderkey": 3590, "o_custkey": 149 }
+{ "o_orderkey": 3591, "o_custkey": 136 }
+{ "o_orderkey": 3616, "o_custkey": 128 }
+{ "o_orderkey": 3619, "o_custkey": 149 }
+{ "o_orderkey": 3620, "o_custkey": 44 }
+{ "o_orderkey": 3621, "o_custkey": 142 }
+{ "o_orderkey": 3622, "o_custkey": 91 }
+{ "o_orderkey": 3648, "o_custkey": 125 }
+{ "o_orderkey": 3650, "o_custkey": 46 }
+{ "o_orderkey": 3651, "o_custkey": 100 }
+{ "o_orderkey": 3652, "o_custkey": 107 }
+{ "o_orderkey": 3655, "o_custkey": 49 }
+{ "o_orderkey": 3680, "o_custkey": 127 }
+{ "o_orderkey": 3681, "o_custkey": 52 }
+{ "o_orderkey": 3683, "o_custkey": 88 }
+{ "o_orderkey": 3687, "o_custkey": 43 }
+{ "o_orderkey": 3712, "o_custkey": 64 }
+{ "o_orderkey": 3713, "o_custkey": 149 }
+{ "o_orderkey": 3715, "o_custkey": 65 }
+{ "o_orderkey": 3716, "o_custkey": 43 }
+{ "o_orderkey": 3719, "o_custkey": 118 }
+{ "o_orderkey": 3744, "o_custkey": 65 }
+{ "o_orderkey": 3745, "o_custkey": 112 }
+{ "o_orderkey": 3746, "o_custkey": 74 }
+{ "o_orderkey": 3747, "o_custkey": 149 }
+{ "o_orderkey": 3748, "o_custkey": 53 }
+{ "o_orderkey": 3750, "o_custkey": 97 }
+{ "o_orderkey": 3776, "o_custkey": 85 }
+{ "o_orderkey": 3778, "o_custkey": 106 }
+{ "o_orderkey": 3779, "o_custkey": 74 }
+{ "o_orderkey": 3780, "o_custkey": 41 }
+{ "o_orderkey": 3781, "o_custkey": 139 }
+{ "o_orderkey": 3782, "o_custkey": 65 }
+{ "o_orderkey": 3783, "o_custkey": 44 }
+{ "o_orderkey": 3808, "o_custkey": 79 }
+{ "o_orderkey": 3809, "o_custkey": 148 }
+{ "o_orderkey": 3810, "o_custkey": 100 }
+{ "o_orderkey": 3811, "o_custkey": 80 }
+{ "o_orderkey": 3812, "o_custkey": 41 }
+{ "o_orderkey": 3813, "o_custkey": 146 }
+{ "o_orderkey": 3814, "o_custkey": 118 }
+{ "o_orderkey": 3815, "o_custkey": 104 }
+{ "o_orderkey": 3840, "o_custkey": 100 }
+{ "o_orderkey": 3841, "o_custkey": 58 }
+{ "o_orderkey": 3844, "o_custkey": 79 }
+{ "o_orderkey": 3845, "o_custkey": 89 }
+{ "o_orderkey": 3846, "o_custkey": 49 }
+{ "o_orderkey": 3872, "o_custkey": 134 }
+{ "o_orderkey": 3873, "o_custkey": 55 }
+{ "o_orderkey": 3874, "o_custkey": 119 }
+{ "o_orderkey": 3875, "o_custkey": 118 }
+{ "o_orderkey": 3878, "o_custkey": 88 }
+{ "o_orderkey": 3879, "o_custkey": 142 }
+{ "o_orderkey": 3904, "o_custkey": 149 }
+{ "o_orderkey": 3906, "o_custkey": 46 }
+{ "o_orderkey": 3907, "o_custkey": 67 }
+{ "o_orderkey": 3908, "o_custkey": 43 }
+{ "o_orderkey": 3910, "o_custkey": 64 }
+{ "o_orderkey": 3937, "o_custkey": 94 }
+{ "o_orderkey": 3939, "o_custkey": 70 }
+{ "o_orderkey": 3940, "o_custkey": 149 }
+{ "o_orderkey": 3941, "o_custkey": 136 }
+{ "o_orderkey": 3942, "o_custkey": 76 }
+{ "o_orderkey": 3969, "o_custkey": 52 }
+{ "o_orderkey": 3970, "o_custkey": 76 }
+{ "o_orderkey": 3971, "o_custkey": 104 }
+{ "o_orderkey": 3972, "o_custkey": 124 }
+{ "o_orderkey": 3973, "o_custkey": 103 }
+{ "o_orderkey": 3974, "o_custkey": 94 }
+{ "o_orderkey": 3975, "o_custkey": 118 }
+{ "o_orderkey": 4000, "o_custkey": 70 }
+{ "o_orderkey": 4001, "o_custkey": 115 }
+{ "o_orderkey": 4002, "o_custkey": 104 }
+{ "o_orderkey": 4003, "o_custkey": 112 }
+{ "o_orderkey": 4004, "o_custkey": 70 }
+{ "o_orderkey": 4005, "o_custkey": 140 }
+{ "o_orderkey": 4033, "o_custkey": 83 }
+{ "o_orderkey": 4034, "o_custkey": 94 }
+{ "o_orderkey": 4035, "o_custkey": 118 }
+{ "o_orderkey": 4036, "o_custkey": 47 }
+{ "o_orderkey": 4037, "o_custkey": 121 }
+{ "o_orderkey": 4038, "o_custkey": 94 }
+{ "o_orderkey": 4064, "o_custkey": 130 }
+{ "o_orderkey": 4065, "o_custkey": 80 }
+{ "o_orderkey": 4068, "o_custkey": 125 }
+{ "o_orderkey": 4069, "o_custkey": 73 }
+{ "o_orderkey": 4071, "o_custkey": 148 }
+{ "o_orderkey": 4096, "o_custkey": 139 }
+{ "o_orderkey": 4101, "o_custkey": 142 }
+{ "o_orderkey": 4103, "o_custkey": 106 }
+{ "o_orderkey": 4128, "o_custkey": 139 }
+{ "o_orderkey": 4130, "o_custkey": 104 }
+{ "o_orderkey": 4131, "o_custkey": 44 }
+{ "o_orderkey": 4133, "o_custkey": 101 }
+{ "o_orderkey": 4134, "o_custkey": 97 }
+{ "o_orderkey": 4160, "o_custkey": 55 }
+{ "o_orderkey": 4161, "o_custkey": 118 }
+{ "o_orderkey": 4163, "o_custkey": 64 }
+{ "o_orderkey": 4164, "o_custkey": 94 }
+{ "o_orderkey": 4166, "o_custkey": 43 }
+{ "o_orderkey": 4192, "o_custkey": 146 }
+{ "o_orderkey": 4194, "o_custkey": 106 }
+{ "o_orderkey": 4195, "o_custkey": 104 }
+{ "o_orderkey": 4196, "o_custkey": 106 }
+{ "o_orderkey": 4197, "o_custkey": 92 }
+{ "o_orderkey": 4198, "o_custkey": 143 }
+{ "o_orderkey": 4224, "o_custkey": 70 }
+{ "o_orderkey": 4225, "o_custkey": 128 }
+{ "o_orderkey": 4226, "o_custkey": 92 }
+{ "o_orderkey": 4227, "o_custkey": 133 }
+{ "o_orderkey": 4228, "o_custkey": 110 }
+{ "o_orderkey": 4230, "o_custkey": 140 }
+{ "o_orderkey": 4231, "o_custkey": 86 }
+{ "o_orderkey": 4256, "o_custkey": 118 }
+{ "o_orderkey": 4258, "o_custkey": 92 }
+{ "o_orderkey": 4259, "o_custkey": 104 }
+{ "o_orderkey": 4260, "o_custkey": 142 }
+{ "o_orderkey": 4261, "o_custkey": 118 }
+{ "o_orderkey": 4262, "o_custkey": 88 }
+{ "o_orderkey": 4289, "o_custkey": 125 }
+{ "o_orderkey": 4290, "o_custkey": 41 }
+{ "o_orderkey": 4291, "o_custkey": 89 }
+{ "o_orderkey": 4293, "o_custkey": 103 }
+{ "o_orderkey": 4294, "o_custkey": 49 }
+{ "o_orderkey": 4320, "o_custkey": 115 }
+{ "o_orderkey": 4322, "o_custkey": 142 }
+{ "o_orderkey": 4323, "o_custkey": 104 }
+{ "o_orderkey": 4324, "o_custkey": 73 }
+{ "o_orderkey": 4325, "o_custkey": 130 }
+{ "o_orderkey": 4327, "o_custkey": 146 }
+{ "o_orderkey": 4353, "o_custkey": 73 }
+{ "o_orderkey": 4354, "o_custkey": 145 }
+{ "o_orderkey": 4356, "o_custkey": 97 }
+{ "o_orderkey": 4357, "o_custkey": 47 }
+{ "o_orderkey": 4385, "o_custkey": 122 }
+{ "o_orderkey": 4386, "o_custkey": 61 }
+{ "o_orderkey": 4387, "o_custkey": 110 }
+{ "o_orderkey": 4389, "o_custkey": 55 }
+{ "o_orderkey": 4416, "o_custkey": 149 }
+{ "o_orderkey": 4417, "o_custkey": 67 }
+{ "o_orderkey": 4418, "o_custkey": 61 }
+{ "o_orderkey": 4419, "o_custkey": 104 }
+{ "o_orderkey": 4420, "o_custkey": 109 }
+{ "o_orderkey": 4422, "o_custkey": 70 }
+{ "o_orderkey": 4423, "o_custkey": 64 }
+{ "o_orderkey": 4448, "o_custkey": 70 }
+{ "o_orderkey": 4450, "o_custkey": 106 }
+{ "o_orderkey": 4453, "o_custkey": 65 }
+{ "o_orderkey": 4454, "o_custkey": 142 }
+{ "o_orderkey": 4480, "o_custkey": 85 }
+{ "o_orderkey": 4481, "o_custkey": 148 }
+{ "o_orderkey": 4482, "o_custkey": 82 }
+{ "o_orderkey": 4483, "o_custkey": 52 }
+{ "o_orderkey": 4484, "o_custkey": 131 }
+{ "o_orderkey": 4485, "o_custkey": 53 }
+{ "o_orderkey": 4487, "o_custkey": 46 }
+{ "o_orderkey": 4512, "o_custkey": 70 }
+{ "o_orderkey": 4513, "o_custkey": 85 }
+{ "o_orderkey": 4514, "o_custkey": 97 }
+{ "o_orderkey": 4515, "o_custkey": 140 }
+{ "o_orderkey": 4516, "o_custkey": 130 }
+{ "o_orderkey": 4517, "o_custkey": 113 }
+{ "o_orderkey": 4518, "o_custkey": 125 }
+{ "o_orderkey": 4519, "o_custkey": 136 }
+{ "o_orderkey": 4544, "o_custkey": 112 }
+{ "o_orderkey": 4545, "o_custkey": 59 }
+{ "o_orderkey": 4546, "o_custkey": 43 }
+{ "o_orderkey": 4547, "o_custkey": 109 }
+{ "o_orderkey": 4548, "o_custkey": 127 }
+{ "o_orderkey": 4549, "o_custkey": 64 }
+{ "o_orderkey": 4550, "o_custkey": 118 }
+{ "o_orderkey": 4551, "o_custkey": 109 }
+{ "o_orderkey": 4576, "o_custkey": 139 }
+{ "o_orderkey": 4577, "o_custkey": 79 }
+{ "o_orderkey": 4578, "o_custkey": 91 }
+{ "o_orderkey": 4579, "o_custkey": 106 }
+{ "o_orderkey": 4580, "o_custkey": 82 }
+{ "o_orderkey": 4581, "o_custkey": 79 }
+{ "o_orderkey": 4608, "o_custkey": 80 }
+{ "o_orderkey": 4609, "o_custkey": 133 }
+{ "o_orderkey": 4612, "o_custkey": 61 }
+{ "o_orderkey": 4613, "o_custkey": 133 }
+{ "o_orderkey": 4614, "o_custkey": 61 }
+{ "o_orderkey": 4640, "o_custkey": 97 }
+{ "o_orderkey": 4641, "o_custkey": 134 }
+{ "o_orderkey": 4642, "o_custkey": 148 }
+{ "o_orderkey": 4643, "o_custkey": 67 }
+{ "o_orderkey": 4644, "o_custkey": 94 }
+{ "o_orderkey": 4645, "o_custkey": 44 }
+{ "o_orderkey": 4646, "o_custkey": 83 }
+{ "o_orderkey": 4672, "o_custkey": 79 }
+{ "o_orderkey": 4673, "o_custkey": 82 }
+{ "o_orderkey": 4675, "o_custkey": 86 }
+{ "o_orderkey": 4678, "o_custkey": 88 }
+{ "o_orderkey": 4679, "o_custkey": 88 }
+{ "o_orderkey": 4705, "o_custkey": 98 }
+{ "o_orderkey": 4707, "o_custkey": 91 }
+{ "o_orderkey": 4708, "o_custkey": 85 }
+{ "o_orderkey": 4710, "o_custkey": 100 }
+{ "o_orderkey": 4711, "o_custkey": 142 }
+{ "o_orderkey": 4736, "o_custkey": 139 }
+{ "o_orderkey": 4737, "o_custkey": 79 }
+{ "o_orderkey": 4739, "o_custkey": 148 }
+{ "o_orderkey": 4740, "o_custkey": 68 }
+{ "o_orderkey": 4741, "o_custkey": 127 }
+{ "o_orderkey": 4742, "o_custkey": 64 }
+{ "o_orderkey": 4743, "o_custkey": 97 }
+{ "o_orderkey": 4768, "o_custkey": 136 }
+{ "o_orderkey": 4769, "o_custkey": 121 }
+{ "o_orderkey": 4770, "o_custkey": 59 }
+{ "o_orderkey": 4771, "o_custkey": 95 }
+{ "o_orderkey": 4773, "o_custkey": 122 }
+{ "o_orderkey": 4774, "o_custkey": 52 }
+{ "o_orderkey": 4775, "o_custkey": 128 }
+{ "o_orderkey": 4801, "o_custkey": 88 }
+{ "o_orderkey": 4802, "o_custkey": 130 }
+{ "o_orderkey": 4803, "o_custkey": 124 }
+{ "o_orderkey": 4807, "o_custkey": 53 }
+{ "o_orderkey": 4833, "o_custkey": 133 }
+{ "o_orderkey": 4835, "o_custkey": 146 }
+{ "o_orderkey": 4836, "o_custkey": 65 }
+{ "o_orderkey": 4837, "o_custkey": 130 }
+{ "o_orderkey": 4838, "o_custkey": 44 }
+{ "o_orderkey": 4864, "o_custkey": 88 }
+{ "o_orderkey": 4865, "o_custkey": 85 }
+{ "o_orderkey": 4866, "o_custkey": 53 }
+{ "o_orderkey": 4868, "o_custkey": 76 }
+{ "o_orderkey": 4869, "o_custkey": 58 }
+{ "o_orderkey": 4870, "o_custkey": 103 }
+{ "o_orderkey": 4871, "o_custkey": 46 }
+{ "o_orderkey": 4896, "o_custkey": 85 }
+{ "o_orderkey": 4897, "o_custkey": 80 }
+{ "o_orderkey": 4899, "o_custkey": 61 }
+{ "o_orderkey": 4900, "o_custkey": 137 }
+{ "o_orderkey": 4901, "o_custkey": 79 }
+{ "o_orderkey": 4902, "o_custkey": 139 }
+{ "o_orderkey": 4903, "o_custkey": 92 }
+{ "o_orderkey": 4929, "o_custkey": 149 }
+{ "o_orderkey": 4930, "o_custkey": 149 }
+{ "o_orderkey": 4931, "o_custkey": 50 }
+{ "o_orderkey": 4932, "o_custkey": 122 }
+{ "o_orderkey": 4933, "o_custkey": 94 }
+{ "o_orderkey": 4960, "o_custkey": 124 }
+{ "o_orderkey": 4961, "o_custkey": 58 }
+{ "o_orderkey": 4962, "o_custkey": 104 }
+{ "o_orderkey": 4964, "o_custkey": 101 }
+{ "o_orderkey": 4965, "o_custkey": 52 }
+{ "o_orderkey": 4966, "o_custkey": 70 }
+{ "o_orderkey": 4967, "o_custkey": 98 }
+{ "o_orderkey": 4992, "o_custkey": 62 }
+{ "o_orderkey": 4994, "o_custkey": 43 }
+{ "o_orderkey": 4996, "o_custkey": 133 }
+{ "o_orderkey": 4997, "o_custkey": 47 }
+{ "o_orderkey": 4999, "o_custkey": 85 }
+{ "o_orderkey": 5024, "o_custkey": 124 }
+{ "o_orderkey": 5025, "o_custkey": 121 }
+{ "o_orderkey": 5027, "o_custkey": 148 }
+{ "o_orderkey": 5030, "o_custkey": 106 }
+{ "o_orderkey": 5031, "o_custkey": 139 }
+{ "o_orderkey": 5056, "o_custkey": 52 }
+{ "o_orderkey": 5057, "o_custkey": 64 }
+{ "o_orderkey": 5058, "o_custkey": 119 }
+{ "o_orderkey": 5059, "o_custkey": 43 }
+{ "o_orderkey": 5060, "o_custkey": 112 }
+{ "o_orderkey": 5061, "o_custkey": 101 }
+{ "o_orderkey": 5062, "o_custkey": 61 }
+{ "o_orderkey": 5088, "o_custkey": 130 }
+{ "o_orderkey": 5089, "o_custkey": 130 }
+{ "o_orderkey": 5090, "o_custkey": 89 }
+{ "o_orderkey": 5091, "o_custkey": 148 }
+{ "o_orderkey": 5093, "o_custkey": 79 }
+{ "o_orderkey": 5094, "o_custkey": 106 }
+{ "o_orderkey": 5095, "o_custkey": 97 }
+{ "o_orderkey": 5121, "o_custkey": 133 }
+{ "o_orderkey": 5122, "o_custkey": 70 }
+{ "o_orderkey": 5126, "o_custkey": 112 }
+{ "o_orderkey": 5127, "o_custkey": 73 }
+{ "o_orderkey": 5152, "o_custkey": 44 }
+{ "o_orderkey": 5153, "o_custkey": 113 }
+{ "o_orderkey": 5155, "o_custkey": 77 }
+{ "o_orderkey": 5156, "o_custkey": 125 }
+{ "o_orderkey": 5157, "o_custkey": 142 }
+{ "o_orderkey": 5158, "o_custkey": 76 }
+{ "o_orderkey": 5159, "o_custkey": 106 }
+{ "o_orderkey": 5184, "o_custkey": 85 }
+{ "o_orderkey": 5185, "o_custkey": 148 }
+{ "o_orderkey": 5186, "o_custkey": 52 }
+{ "o_orderkey": 5187, "o_custkey": 55 }
+{ "o_orderkey": 5188, "o_custkey": 140 }
+{ "o_orderkey": 5189, "o_custkey": 71 }
+{ "o_orderkey": 5190, "o_custkey": 58 }
+{ "o_orderkey": 5191, "o_custkey": 77 }
+{ "o_orderkey": 5216, "o_custkey": 59 }
+{ "o_orderkey": 5218, "o_custkey": 82 }
+{ "o_orderkey": 5219, "o_custkey": 88 }
+{ "o_orderkey": 5222, "o_custkey": 80 }
+{ "o_orderkey": 5223, "o_custkey": 149 }
+{ "o_orderkey": 5248, "o_custkey": 70 }
+{ "o_orderkey": 5249, "o_custkey": 103 }
+{ "o_orderkey": 5250, "o_custkey": 97 }
+{ "o_orderkey": 5252, "o_custkey": 91 }
+{ "o_orderkey": 5253, "o_custkey": 148 }
+{ "o_orderkey": 5254, "o_custkey": 112 }
+{ "o_orderkey": 5255, "o_custkey": 64 }
+{ "o_orderkey": 5281, "o_custkey": 124 }
+{ "o_orderkey": 5282, "o_custkey": 50 }
+{ "o_orderkey": 5283, "o_custkey": 131 }
+{ "o_orderkey": 5284, "o_custkey": 61 }
+{ "o_orderkey": 5285, "o_custkey": 70 }
+{ "o_orderkey": 5286, "o_custkey": 116 }
+{ "o_orderkey": 5312, "o_custkey": 65 }
+{ "o_orderkey": 5315, "o_custkey": 139 }
+{ "o_orderkey": 5316, "o_custkey": 100 }
+{ "o_orderkey": 5318, "o_custkey": 59 }
+{ "o_orderkey": 5319, "o_custkey": 98 }
+{ "o_orderkey": 5344, "o_custkey": 109 }
+{ "o_orderkey": 5347, "o_custkey": 49 }
+{ "o_orderkey": 5348, "o_custkey": 53 }
+{ "o_orderkey": 5349, "o_custkey": 67 }
+{ "o_orderkey": 5350, "o_custkey": 76 }
+{ "o_orderkey": 5351, "o_custkey": 122 }
+{ "o_orderkey": 5376, "o_custkey": 149 }
+{ "o_orderkey": 5377, "o_custkey": 64 }
+{ "o_orderkey": 5378, "o_custkey": 43 }
+{ "o_orderkey": 5379, "o_custkey": 89 }
+{ "o_orderkey": 5380, "o_custkey": 148 }
+{ "o_orderkey": 5411, "o_custkey": 61 }
+{ "o_orderkey": 5412, "o_custkey": 142 }
+{ "o_orderkey": 5413, "o_custkey": 94 }
+{ "o_orderkey": 5414, "o_custkey": 100 }
+{ "o_orderkey": 5440, "o_custkey": 130 }
+{ "o_orderkey": 5441, "o_custkey": 41 }
+{ "o_orderkey": 5442, "o_custkey": 43 }
+{ "o_orderkey": 5443, "o_custkey": 131 }
+{ "o_orderkey": 5444, "o_custkey": 130 }
+{ "o_orderkey": 5445, "o_custkey": 115 }
+{ "o_orderkey": 5472, "o_custkey": 70 }
+{ "o_orderkey": 5473, "o_custkey": 65 }
+{ "o_orderkey": 5474, "o_custkey": 55 }
+{ "o_orderkey": 5475, "o_custkey": 139 }
+{ "o_orderkey": 5476, "o_custkey": 91 }
+{ "o_orderkey": 5477, "o_custkey": 107 }
+{ "o_orderkey": 5478, "o_custkey": 116 }
+{ "o_orderkey": 5479, "o_custkey": 70 }
+{ "o_orderkey": 5505, "o_custkey": 95 }
+{ "o_orderkey": 5506, "o_custkey": 91 }
+{ "o_orderkey": 5508, "o_custkey": 56 }
+{ "o_orderkey": 5509, "o_custkey": 80 }
+{ "o_orderkey": 5511, "o_custkey": 79 }
+{ "o_orderkey": 5536, "o_custkey": 116 }
+{ "o_orderkey": 5537, "o_custkey": 118 }
+{ "o_orderkey": 5538, "o_custkey": 139 }
+{ "o_orderkey": 5539, "o_custkey": 119 }
+{ "o_orderkey": 5540, "o_custkey": 130 }
+{ "o_orderkey": 5541, "o_custkey": 143 }
+{ "o_orderkey": 5542, "o_custkey": 49 }
+{ "o_orderkey": 5543, "o_custkey": 115 }
+{ "o_orderkey": 5569, "o_custkey": 109 }
+{ "o_orderkey": 5570, "o_custkey": 112 }
+{ "o_orderkey": 5571, "o_custkey": 103 }
+{ "o_orderkey": 5575, "o_custkey": 103 }
+{ "o_orderkey": 5600, "o_custkey": 95 }
+{ "o_orderkey": 5602, "o_custkey": 130 }
+{ "o_orderkey": 5603, "o_custkey": 71 }
+{ "o_orderkey": 5604, "o_custkey": 46 }
+{ "o_orderkey": 5606, "o_custkey": 149 }
+{ "o_orderkey": 5607, "o_custkey": 92 }
+{ "o_orderkey": 5632, "o_custkey": 79 }
+{ "o_orderkey": 5633, "o_custkey": 79 }
+{ "o_orderkey": 5634, "o_custkey": 68 }
+{ "o_orderkey": 5635, "o_custkey": 70 }
+{ "o_orderkey": 5636, "o_custkey": 122 }
+{ "o_orderkey": 5637, "o_custkey": 103 }
+{ "o_orderkey": 5638, "o_custkey": 109 }
+{ "o_orderkey": 5639, "o_custkey": 145 }
+{ "o_orderkey": 5664, "o_custkey": 119 }
+{ "o_orderkey": 5665, "o_custkey": 100 }
+{ "o_orderkey": 5667, "o_custkey": 44 }
+{ "o_orderkey": 5668, "o_custkey": 109 }
+{ "o_orderkey": 5669, "o_custkey": 74 }
+{ "o_orderkey": 5671, "o_custkey": 43 }
+{ "o_orderkey": 5696, "o_custkey": 142 }
+{ "o_orderkey": 5697, "o_custkey": 55 }
+{ "o_orderkey": 5698, "o_custkey": 95 }
+{ "o_orderkey": 5699, "o_custkey": 142 }
+{ "o_orderkey": 5700, "o_custkey": 143 }
+{ "o_orderkey": 5701, "o_custkey": 43 }
+{ "o_orderkey": 5702, "o_custkey": 97 }
+{ "o_orderkey": 5703, "o_custkey": 121 }
+{ "o_orderkey": 5728, "o_custkey": 80 }
+{ "o_orderkey": 5729, "o_custkey": 44 }
+{ "o_orderkey": 5733, "o_custkey": 101 }
+{ "o_orderkey": 5734, "o_custkey": 94 }
+{ "o_orderkey": 5762, "o_custkey": 49 }
+{ "o_orderkey": 5764, "o_custkey": 131 }
+{ "o_orderkey": 5765, "o_custkey": 52 }
+{ "o_orderkey": 5766, "o_custkey": 49 }
+{ "o_orderkey": 5767, "o_custkey": 118 }
+{ "o_orderkey": 5796, "o_custkey": 149 }
+{ "o_orderkey": 5797, "o_custkey": 122 }
+{ "o_orderkey": 5798, "o_custkey": 106 }
+{ "o_orderkey": 5824, "o_custkey": 56 }
+{ "o_orderkey": 5825, "o_custkey": 61 }
+{ "o_orderkey": 5828, "o_custkey": 127 }
+{ "o_orderkey": 5829, "o_custkey": 125 }
+{ "o_orderkey": 5830, "o_custkey": 85 }
+{ "o_orderkey": 5831, "o_custkey": 139 }
+{ "o_orderkey": 5857, "o_custkey": 124 }
+{ "o_orderkey": 5858, "o_custkey": 64 }
+{ "o_orderkey": 5861, "o_custkey": 139 }
+{ "o_orderkey": 5862, "o_custkey": 64 }
+{ "o_orderkey": 5863, "o_custkey": 65 }
+{ "o_orderkey": 5888, "o_custkey": 46 }
+{ "o_orderkey": 5890, "o_custkey": 49 }
+{ "o_orderkey": 5891, "o_custkey": 46 }
+{ "o_orderkey": 5892, "o_custkey": 101 }
+{ "o_orderkey": 5894, "o_custkey": 71 }
+{ "o_orderkey": 5895, "o_custkey": 64 }
+{ "o_orderkey": 5920, "o_custkey": 119 }
+{ "o_orderkey": 5921, "o_custkey": 58 }
+{ "o_orderkey": 5922, "o_custkey": 143 }
+{ "o_orderkey": 5923, "o_custkey": 101 }
+{ "o_orderkey": 5925, "o_custkey": 146 }
+{ "o_orderkey": 5926, "o_custkey": 76 }
+{ "o_orderkey": 5927, "o_custkey": 116 }
+{ "o_orderkey": 5952, "o_custkey": 148 }
+{ "o_orderkey": 5955, "o_custkey": 94 }
+{ "o_orderkey": 5957, "o_custkey": 89 }
+{ "o_orderkey": 5958, "o_custkey": 115 }
+{ "o_orderkey": 5984, "o_custkey": 70 }
+{ "o_orderkey": 5985, "o_custkey": 143 }
+{ "o_orderkey": 5986, "o_custkey": 115 }
+{ "o_orderkey": 5987, "o_custkey": 64 }
+{ "o_orderkey": 10986, "o_custkey": 115 }
+{ "o_orderkey": 10987, "o_custkey": 64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/primary-index/primary-index.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/primary-index/primary-index.1.adm
new file mode 100644
index 0000000..2456990
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/primary-index/primary-index.1.adm
@@ -0,0 +1,9 @@
+{ "id": 6i32, "age": 6i32, "name": "Tracy", "salary": 123.0d }
+{ "id": 12i32, "age": 44i32, "name": "Smith", "salary": 987.0d }
+{ "id": 1i32, "age": 2i32, "name": "Mohammed", "salary": 155.0d }
+{ "id": 2i32, "age": 2i32, "name": "Stephen", "salary": 155.0d }
+{ "id": 4i32, "age": 4i32, "name": "Angela", "salary": 333.0d }
+{ "id": 8i32, "age": 8i32, "name": "George", "salary": 555.0d }
+{ "id": 3i32, "age": 4i32, "name": "Kate", "salary": 333.0d }
+{ "id": 5i32, "age": 6i32, "name": "William", "salary": 123.0d }
+{ "id": 7i32, "age": 8i32, "name": "Stanly", "salary": 555.0d }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-btree/primary-secondary-btree.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-btree/primary-secondary-btree.1.adm
new file mode 100644
index 0000000..fc52536
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-btree/primary-secondary-btree.1.adm
@@ -0,0 +1,5 @@
+{ "id": 6i32, "age": 6i32, "name": "Tracy", "salary": 123.0d }
+{ "id": 12i32, "age": 44i32, "name": "Smith", "salary": 987.0d }
+{ "id": 8i32, "age": 8i32, "name": "George", "salary": 555.0d }
+{ "id": 5i32, "age": 6i32, "name": "William", "salary": 123.0d }
+{ "id": 7i32, "age": 8i32, "name": "Stanly", "salary": 555.0d }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-inverted/primary-secondary-inverted.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-inverted/primary-secondary-inverted.1.adm
new file mode 100644
index 0000000..9fbfb7f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-inverted/primary-secondary-inverted.1.adm
@@ -0,0 +1,5 @@
+{ "id": 3, "dblpid": "books/acm/kim95/BreitbartGS95", "title": "SQL bbbbbbbbbbbbbbbbbb", "authors": "Yuri Breitbart Hector Garcia-Molina Abraham Silberschatz", "misc": "2004-03-08 573-591 Modern Database Systems books/acm/Kim95 db/books/collections/kim95.html#BreitbartGS95 1995" }
+{ "id": 10, "dblpid": "books/acm/kim95/KelleyGKRG95", "title": "Schema Architecture of the UniSQL/M Multidatabase System", "authors": "William Kelley Sunit K. Gala Won Kim Tom C. Reyes Bruce Graham", "misc": "2004-03-08 Modern Database Systems books/acm/Kim95 621-648 1995 db/books/collections/kim95.html#KelleyGKRG95" }
+{ "id": 31, "dblpid": "books/acm/kim95/Stout95", "title": "EDA/SQL.", "authors": "Ralph L. Stout", "misc": "2004-03-08 649-663 Modern Database Systems books/acm/Kim95 db/books/collections/kim95.html#Stout95 1995" }
+{ "id": 104, "dblpid": "conf/focs/GalilT86", "title": "SQL An O(n^2 (m + n log n) log n) Min-Cost Flow Algorithm", "authors": "Zvi Galil Éva Tardos", "misc": "2006-04-25 1-9 conf/focs/FOCS27 1986 FOCS db/conf/focs/focs86.html#GalilT86" }
+{ "id": 666, "dblpid": "books/acm/kim95/DittrichD95", "title": "hhhhhhhhhhhhBMSs SQL Should Do Better A Critique Based on Early Experiences.", "authors": "Angelika Kotz Dittrich Klaus R. Dittrich", "misc": "2002-01-03 238-254 1995 Modern Database Systems db/books/collections/kim95.html#DittrichD95" }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-rtree/primary-secondary-rtree.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-rtree/primary-secondary-rtree.1.adm
new file mode 100644
index 0000000..9c85166
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/primary-secondary-rtree/primary-secondary-rtree.1.adm
@@ -0,0 +1 @@
+{ "id": 20 }
diff --git a/asterix-app/src/test/resources/runtimets/results/upsert/upsert-with-self-read/upsert-with-self-read.1.adm b/asterix-app/src/test/resources/runtimets/results/upsert/upsert-with-self-read/upsert-with-self-read.1.adm
new file mode 100644
index 0000000..37ef294
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/upsert/upsert-with-self-read/upsert-with-self-read.1.adm
@@ -0,0 +1,5 @@
+{ "id": 6i32, "age": 11i32, "name": "Silvester", "salary": 135.3d }
+{ "id": 12i32, "age": 45i32, "name": "Smith", "salary": 1085.7d }
+{ "id": 1i32, "age": 12i32, "name": "Cloud", "salary": 854.7d }
+{ "id": 2i32, "age": 11i32, "name": "Nadia", "salary": 170.5d }
+{ "id": 4i32, "age": 11i32, "name": "Igor", "salary": 366.3d }
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 5d55f2d..621c73a 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1240,8 +1240,65 @@
</test-case>
-->
</test-group>
+ <test-group name="upsert">
+ <test-case FilePath="upsert">
+ <compilation-unit name="primary-secondary-rtree">
+ <output-dir compare="Text">primary-secondary-rtree</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="upsert-with-self-read">
+ <output-dir compare="Text">upsert-with-self-read</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="filtered-dataset">
+ <output-dir compare="Text">filtered-dataset</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="nullable-index">
+ <output-dir compare="Text">nullable-index</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="nested-index">
+ <output-dir compare="Text">nested-index</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="open-index">
+ <output-dir compare="Text">open-index</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="primary-index">
+ <output-dir compare="Text">primary-index</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="primary-secondary-btree">
+ <output-dir compare="Text">primary-secondary-btree</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="primary-secondary-inverted">
+ <output-dir compare="Text">primary-secondary-inverted</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="upsert">
+ <compilation-unit name="multiple-secondaries">
+ <output-dir compare="Text">multiple-secondaries</output-dir>
+ </compilation-unit>
+ </test-case>
+ </test-group>
<test-group name="dml">
<test-case FilePath="dml">
+ <compilation-unit name="load-with-ngram-index">
+ <output-dir compare="Text">load-with-ngram-index</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="dml">
<compilation-unit name="insert-duplicated-keys-from-query">
<output-dir compare="Text">insert-duplicated-keys-from-query</output-dir>
<expected-error>org.apache.hyracks.storage.am.common.exceptions.TreeIndexDuplicateKeyException: Failed to insert key since key already exists</expected-error>
@@ -1470,11 +1527,6 @@
</compilation-unit>
</test-case>
<test-case FilePath="dml">
- <compilation-unit name="load-with-ngram-index">
- <output-dir compare="Text">load-with-ngram-index</output-dir>
- </compilation-unit>
- </test-case>
- <test-case FilePath="dml">
<compilation-unit name="load-with-rtree-index">
<output-dir compare="Text">load-with-rtree-index</output-dir>
</compilation-unit>