[ASTERIXDB-2523][RT][COMP] add support for hashing record fields

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
Add support for hashing record fields.
- Added hashing records in GenericHashFunction.
- Extracted common functionality from comparators and hash functions into
CompareHashUtil.
- Added test cases.

Change-Id: I9d18a17089afdc6e28ff01091d890b375868969c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3249
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-app/data/complex/records1.adm b/asterixdb/asterix-app/data/complex/records1.adm
index d425baa..983c122 100644
--- a/asterixdb/asterix-app/data/complex/records1.adm
+++ b/asterixdb/asterix-app/data/complex/records1.adm
@@ -30,4 +30,12 @@
 {"id":32, "name":"May", "address": {"state": "ON", "country": "Canada"} }
 {"id":33, "name":"Tiger", "address": {"street": null, "apt": null, "state": "CO", "country": "USA"} }
 {"id":34, "name":"Nicole", "address": {"street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA"} }
-{"id":35, "name":"Adam", "address": {"street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
\ No newline at end of file
+{"id":35, "name":"Adam", "address": {"street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
+{"id":36, "name":"Smith", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":37, "name":"James", "address": {"street": "10th", "apt": null, "state": "MO", "country": "USA"} }
+{"id":38, "name":"Charles", "address": {"state": "AL", "country": "USA"} }
+{"id":39, "name":"Flex", "address": {"street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":40, "name":"Simone", "address": {"state": "OR", "country": "USA"} }
+{"id":41, "name":"Roy", "address": {"state": "AL", "country": "USA"} }
+{"id":42, "name":"Albert", "address": {"state": "CA", "country": "USA"} }
+{"id":43, "name":"Jacob", "address": {"state": "CA", "country": "USA"} }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/complex/records2.adm b/asterixdb/asterix-app/data/complex/records2.adm
index 7ba1308..a78221d 100644
--- a/asterixdb/asterix-app/data/complex/records2.adm
+++ b/asterixdb/asterix-app/data/complex/records2.adm
@@ -32,4 +32,12 @@
 {"id":32, "name":"May", "address": {"state": "ON", "country": "Canada"} }
 {"id":33, "name":"Tiger", "address": {"street": null, "apt": null, "state": "CO", "country": "USA"} }
 {"id":34, "name":"Nicole", "address": {"street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA"} }
-{"id":35, "name":"Adam", "address": {"street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
\ No newline at end of file
+{"id":35, "name":"Adam", "address": {"street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
+{"id":36, "name":"Smith", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":37, "name":"James", "address": {"street": "10th", "apt": null, "state": "MO", "country": "USA"} }
+{"id":38, "name":"Charles", "address": {"state": "AL", "country": "USA"} }
+{"id":39, "name":"Flex", "address": {"street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":40, "name":"Simone", "address": {"state": "OR", "country": "USA"} }
+{"id":41, "name":"Roy", "address": {"state": "AL", "country": "USA"} }
+{"id":42, "name":"Albert", "address": {"state": "CA", "country": "USA"} }
+{"id":43, "name":"Jacob", "address": {"state": "CA", "country": "USA"} }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/complex/records3.adm b/asterixdb/asterix-app/data/complex/records3.adm
new file mode 100644
index 0000000..0511c6c
--- /dev/null
+++ b/asterixdb/asterix-app/data/complex/records3.adm
@@ -0,0 +1,34 @@
+{"id":2, "name":"Isac", "address": {"street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA"} }
+{"id":3, "name":"Emory", "address": {"street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
+{"id":4, "name":"Nicholas", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":5, "name":"Von", "address": {"street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA"} }
+{"id":6, "name":"Willis", "address": {"street": "10th", "apt": 9, "state": "MO", "country": "USA"} }
+{"id":7, "name":"Suzanna", "address": {"street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA"} }
+{"id":8, "name":"Nicole", "address": {"street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA"} }
+{"id":9, "name":"Woodrow", "address": {"street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":11, "name":"Nicholas", "address": {"state": "CA", "zipcode": 92212, "country": "USA"} }
+{"id":13, "name":"Steve", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":14, "name":"Jay", "address": {"street": "10th", "apt": null, "state": "MO", "country": "USA"} }
+{"id":15, "name":"Jim", "address": null }
+{"id":16, "name":"Wail"}
+{"id":17, "name":"Jim"}
+{"id":18, "name":"Kayle", "address": null }
+{"id":21, "name":"Ken", "address": {"street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":22, "name":"Fend", "address": {"street": "16th", "state": "BC", "country": "Canada"} }
+{"id":23, "name":"Adrian", "address": {"street": "14th", "state": "MN", "zipcode": 78812, "country": "USA"} }
+{"id":24, "name":"Trent", "address": null }
+{"id":27, "name":"Eric", "address": {"state": "CA", "country": "USA"} }
+{"id":28, "name":"Lory", "address": {"state": "AL", "country": "USA"} }
+{"id":29, "name":"David", "address": {"state": "OR", "country": "USA"} }
+{"id":30, "name":"Rock", "address": {"state": "BC", "country": "Canada"} }
+{"id":31, "name":"Sam", "address": {"state": "BC", "country": "Canada"} }
+{"id":34, "name":"Nicole", "address": {"street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA"} }
+{"id":35, "name":"Adam", "address": {"street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
+{"id":36, "name":"Smith", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":37, "name":"James", "address": {"street": "10th", "apt": null, "state": "MO", "country": "USA"} }
+{"id":38, "name":"Charles", "address": {"state": "AL", "country": "USA"} }
+{"id":39, "name":"Flex", "address": {"street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":40, "name":"Simone", "address": {"state": "OR", "country": "USA"} }
+{"id":41, "name":"Roy", "address": {"state": "AL", "country": "USA"} }
+{"id":42, "name":"Albert", "address": {"state": "CA", "country": "USA"} }
+{"id":43, "name":"Jacob", "address": {"state": "CA", "country": "USA"} }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/complex/records4.adm b/asterixdb/asterix-app/data/complex/records4.adm
new file mode 100644
index 0000000..ac5e14c
--- /dev/null
+++ b/asterixdb/asterix-app/data/complex/records4.adm
@@ -0,0 +1,34 @@
+{"id":2, "name":"Isac", "address": {"street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA"} }
+{"id":3, "name":"Emory", "address": {"street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
+{"id":4, "name":"Nicholas", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":5, "name":"Von", "address": {"street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA"} }
+{"id":6, "name":"Willis", "address": {"street": "10th", "apt": 9, "state": "MO", "country": "USA"} }
+{"id":7, "name":"Suzanna", "address": {"street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA"} }
+{"id":8, "name":"Nicole", "address": {"street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA"} }
+{"id":9, "name":"Woodrow", "address": {"street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":11, "name":"Nicholas", "address": {"state": "CA", "zipcode": 92212, "country": "USA"} }
+{"id":13, "name":"Steve", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":14, "name":"Jay", "address": {"street": "10th", "apt": null, "state": "MO", "country": "USA"} }
+{"id":15, "name":"Jim", "address": null }
+{"id":16, "name":"Wail"}
+{"id":17, "name":"Jim"}
+{"id":18, "name":"Kayle", "address": null }
+{"id":21, "name":"Ken", "address": {"street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":22, "name":"Fend", "address": {"street": "16th", "state": "BC", "country": "Canada"} }
+{"id":23, "name":"Adrian", "address": {"street": "14th", "state": "MN", "zipcode": 78812, "country": "USA"} }
+{"id":24, "name":"Trent", "address": { } }
+{"id":27, "name":"Eric", "address": {"state": "CA", "country": "USA"} }
+{"id":28, "name":"Lory", "address": {"state": "AL", "country": "USA"} }
+{"id":29, "name":"David", "address": {"state": "OR", "country": "USA"} }
+{"id":30, "name":"Rock", "address": {"state": "BC", "country": "Canada"} }
+{"id":31, "name":"Sam", "address": {"state": "BC", "country": "Canada"} }
+{"id":34, "name":"Nicole", "address": {"street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA"} }
+{"id":35, "name":"Adam", "address": {"street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA"} }
+{"id":36, "name":"Smith", "address": {"street": "19th", "state": "IN", "zipcode": 88232, "country": "USA"} }
+{"id":37, "name":"James", "address": {"street": "10th", "apt": null, "state": "MO", "country": "USA"} }
+{"id":38, "name":"Charles", "address": {"state": "AL", "country": "USA"} }
+{"id":39, "name":"Flex", "address": {"street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA"} }
+{"id":40, "name":"Simone", "address": {"state": "OR", "country": "USA"} }
+{"id":41, "name":"Roy", "address": {"state": "AL", "country": "USA"} }
+{"id":42, "name":"Albert", "address": {"state": "CA", "country": "USA"} }
+{"id":43, "name":"Jacob", "address": {"state": "CA", "country": "USA"} }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.1.ddl.sqlpp
new file mode 100644
index 0000000..fa1b9a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.1.ddl.sqlpp
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+// testing comparing and hashing fields whose values are records
+drop  dataverse test if exists;
+create  dataverse test;
+use test;
+
+create type addressType1 as {
+state: string,
+country: string,
+apt: int?,
+street: string?,
+zipcode: int?
+};
+
+create type addressType2 as {
+state: string,
+country: string
+};
+
+create type closedType1 as closed {
+id: int,
+name: string,
+address: addressType1?
+};
+
+create type closedType2 as closed {
+id: int,
+name: string,
+address: addressType2?
+};
+
+create type openType as open {
+id: int,
+name: string
+};
+
+create dataset closedDs1(closedType1) primary key id;
+create dataset closedDs2(closedType2) primary key id;
+create dataset openDs(openType) primary key id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.2.update.sqlpp
new file mode 100644
index 0000000..c89bf16
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.2.update.sqlpp
@@ -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 test;
+
+load dataset closedDs1 using localfs (("path"="asterix_nc1://data/complex/records1.adm"),("format"="adm"));
+load dataset closedDs2 using localfs (("path"="asterix_nc1://data/complex/records1.adm"),("format"="adm"));
+load dataset openDs using localfs (("path"="asterix_nc1://data/complex/records2.adm"),("format"="adm"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.3.query.sqlpp
new file mode 100644
index 0000000..ec1f103
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.3.query.sqlpp
@@ -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 test;
+
+from openDs v
+select distinct v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.4.query.sqlpp
new file mode 100644
index 0000000..9982dac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.4.query.sqlpp
@@ -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 test;
+
+from closedDs1 v
+select distinct v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.5.query.sqlpp
new file mode 100644
index 0000000..8b404ac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.5.query.sqlpp
@@ -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 test;
+
+from closedDs2 v
+select distinct v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.6.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/distinct/record/record.6.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.query.sqlpp
new file mode 100644
index 0000000..7c457f0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from openDs v
+/*+ hash */
+group by v.dept_ids
+select count(*) as count, v.dept_ids
+order by v.dept_ids;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.6.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.6.query.sqlpp
new file mode 100644
index 0000000..6531ab4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.6.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from closedDs v
+/*+ hash */
+group by v.dept_ids
+select count(*) as count, v.dept_ids
+order by v.dept_ids;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.7.ddl.sqlpp
similarity index 100%
rename from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp
rename to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.7.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.1.ddl.sqlpp
new file mode 100644
index 0000000..ece9cec
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.1.ddl.sqlpp
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+// testing grouping by fields whose values are records
+drop  dataverse test if exists;
+create  dataverse test;
+use test;
+
+create type addressType1 as {
+state: string,
+country: string,
+apt: int?,
+street: string?,
+zipcode: int?
+};
+
+create type addressType2 as {
+state: string,
+country: string
+};
+
+create type closedType1 as closed {
+id: int,
+name: string,
+address: addressType1?
+};
+
+create type closedType2 as closed {
+id: int,
+name: string,
+address: addressType2?
+};
+
+create type openType as open {
+id: int,
+name: string
+};
+
+create dataset closedDs1(closedType1) primary key id;
+create dataset closedDs2(closedType2) primary key id;
+create dataset openDs(openType) primary key id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.2.update.sqlpp
new file mode 100644
index 0000000..c89bf16
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.2.update.sqlpp
@@ -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 test;
+
+load dataset closedDs1 using localfs (("path"="asterix_nc1://data/complex/records1.adm"),("format"="adm"));
+load dataset closedDs2 using localfs (("path"="asterix_nc1://data/complex/records1.adm"),("format"="adm"));
+load dataset openDs using localfs (("path"="asterix_nc1://data/complex/records2.adm"),("format"="adm"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.3.query.sqlpp
new file mode 100644
index 0000000..3122a56
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.3.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from openDs v
+group by v.address
+select count(*) as count, v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.4.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.4.query.sqlpp
new file mode 100644
index 0000000..f6c098f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.4.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from closedDs1 v
+group by v.address
+select count(*) as count, v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.5.query.sqlpp
new file mode 100644
index 0000000..789765d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.5.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from closedDs2 v
+group by v.address
+select count(*) as count, v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.6.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.6.query.sqlpp
new file mode 100644
index 0000000..a7061f2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.6.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from openDs v
+/*+ hash */
+group by v.address
+select count(*) as count, v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.7.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.7.query.sqlpp
new file mode 100644
index 0000000..cba0595
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.7.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from closedDs1 v
+/*+ hash */
+group by v.address
+select count(*) as count, v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.8.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.8.query.sqlpp
new file mode 100644
index 0000000..5401380
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.8.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use test;
+
+from closedDs2 v
+/*+ hash */
+group by v.address
+select count(*) as count, v.address
+order by v.address;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.9.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-record/gby-record.9.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.01.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.01.ddl.sqlpp
new file mode 100644
index 0000000..47da14d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.01.ddl.sqlpp
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+// testing joining on fields whose values are records
+drop  dataverse test if exists;
+create  dataverse test;
+use test;
+
+create type addressType1 as {
+state: string,
+country: string,
+apt: int?,
+street: string?,
+zipcode: int?
+};
+
+create type addressType2 as {
+state: string,
+country: string
+};
+
+create type closedType1 as closed {
+id: int,
+name: string,
+address: addressType1?
+};
+
+create type closedType2 as closed {
+id: int,
+name: string,
+address: addressType2?
+};
+
+create type openType as open {
+id: int,
+name: string
+};
+
+create dataset closedDs1Left(closedType1) primary key id;
+create dataset closedDs2Left(closedType2) primary key id;
+create dataset openDsLeft(openType) primary key id;
+
+create dataset closedDs1Right(closedType1) primary key id;
+create dataset closedDs2Right(closedType2) primary key id;
+create dataset openDsRight(openType) primary key id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.02.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.02.update.sqlpp
new file mode 100644
index 0000000..52440f8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.02.update.sqlpp
@@ -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 test;
+
+load dataset closedDs1Left using localfs (("path"="asterix_nc1://data/complex/records1.adm"),("format"="adm"));
+load dataset closedDs2Left using localfs (("path"="asterix_nc1://data/complex/records1.adm"),("format"="adm"));
+load dataset openDsLeft using localfs (("path"="asterix_nc1://data/complex/records2.adm"),("format"="adm"));
+
+load dataset closedDs1Right using localfs (("path"="asterix_nc1://data/complex/records3.adm"),("format"="adm"));
+load dataset closedDs2Right using localfs (("path"="asterix_nc1://data/complex/records3.adm"),("format"="adm"));
+load dataset openDsRight using localfs (("path"="asterix_nc1://data/complex/records4.adm"),("format"="adm"));
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.03.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.03.query.sqlpp
new file mode 100644
index 0000000..a8906e7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.03.query.sqlpp
@@ -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 test;
+
+from openDsLeft v1 JOIN openDsRight v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.04.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.04.query.sqlpp
new file mode 100644
index 0000000..9b04300
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.04.query.sqlpp
@@ -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 test;
+
+from openDsLeft v1 JOIN closedDs1Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.05.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.05.query.sqlpp
new file mode 100644
index 0000000..54831d6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.05.query.sqlpp
@@ -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 test;
+
+from openDsLeft v1 JOIN closedDs2Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.06.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.06.query.sqlpp
new file mode 100644
index 0000000..7196880
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.06.query.sqlpp
@@ -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 test;
+
+from closedDs1Left v1 JOIN openDsRight v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.07.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.07.query.sqlpp
new file mode 100644
index 0000000..1997e44
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.07.query.sqlpp
@@ -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 test;
+
+from closedDs1Left v1 JOIN closedDs1Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.08.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.08.query.sqlpp
new file mode 100644
index 0000000..02bb0f6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.08.query.sqlpp
@@ -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 test;
+
+from closedDs1Left v1 JOIN closedDs2Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.09.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.09.query.sqlpp
new file mode 100644
index 0000000..4536eb4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.09.query.sqlpp
@@ -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 test;
+
+from closedDs2Left v1 JOIN openDsRight v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.10.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.10.query.sqlpp
new file mode 100644
index 0000000..eb96f5a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.10.query.sqlpp
@@ -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 test;
+
+from closedDs2Left v1 JOIN closedDs1Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.11.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.11.query.sqlpp
new file mode 100644
index 0000000..3c97cdc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.11.query.sqlpp
@@ -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 test;
+
+from closedDs2Left v1 JOIN closedDs2Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.12.query.sqlpp
new file mode 100644
index 0000000..18bc385
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.12.query.sqlpp
@@ -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 test;
+
+from openDsLeft v1 LEFT OUTER JOIN openDsRight v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.13.query.sqlpp
new file mode 100644
index 0000000..c8662e2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.13.query.sqlpp
@@ -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 test;
+
+from openDsLeft v1 LEFT OUTER JOIN closedDs1Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.14.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.14.query.sqlpp
new file mode 100644
index 0000000..140db9c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.14.query.sqlpp
@@ -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 test;
+
+from openDsLeft v1 LEFT OUTER JOIN closedDs2Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.15.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.15.query.sqlpp
new file mode 100644
index 0000000..20bc12f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.15.query.sqlpp
@@ -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 test;
+
+from closedDs1Left v1 LEFT OUTER JOIN openDsRight v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.16.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.16.query.sqlpp
new file mode 100644
index 0000000..8a9f8c6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.16.query.sqlpp
@@ -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 test;
+
+from closedDs1Left v1 LEFT OUTER JOIN closedDs1Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.17.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.17.query.sqlpp
new file mode 100644
index 0000000..097ec0a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.17.query.sqlpp
@@ -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 test;
+
+from closedDs1Left v1 LEFT OUTER JOIN closedDs2Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.18.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.18.query.sqlpp
new file mode 100644
index 0000000..7a742b4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.18.query.sqlpp
@@ -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 test;
+
+from closedDs2Left v1 LEFT OUTER JOIN openDsRight v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.19.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.19.query.sqlpp
new file mode 100644
index 0000000..1aeddd1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.19.query.sqlpp
@@ -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 test;
+
+from closedDs2Left v1 LEFT OUTER JOIN closedDs1Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.20.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.20.query.sqlpp
new file mode 100644
index 0000000..77fbbf8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.20.query.sqlpp
@@ -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 test;
+
+from closedDs2Left v1 LEFT OUTER JOIN closedDs2Right v2 ON v1.address = v2.address
+select v1.id as id1, v2.id as id2, v1.address as add1, v2.address as add2
+order by v1.id, v2.id;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.21.ddl.sqlpp
similarity index 100%
copy from asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/group-by/gby-array/gby-array.5.ddl.sqlpp
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/join/hash_join_record/hash_join_record.21.ddl.sqlpp
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.3.adm
new file mode 100644
index 0000000..ab1f8db
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.3.adm
@@ -0,0 +1,28 @@
+{  }
+{ "address": null }
+{ "address": {  } }
+{ "address": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
+{ "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "address": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "address": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "address": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "address": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "address": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "address": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "address": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "address": { "street": "10th", "apt": 9, "state": "ON", "country": "Canada" } }
+{ "address": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "address": { "street": "18th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "address": { "state": "BC", "country": "Canada" } }
+{ "address": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "address": { "state": "ON", "country": "Canada" } }
+{ "address": { "state": "AL", "country": "USA" } }
+{ "address": { "state": "CA", "country": "USA" } }
+{ "address": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "address": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "address": { "state": "OR", "country": "USA" } }
+{ "address": { "state": "OR", "zipcode": 97444, "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.4.adm
new file mode 100644
index 0000000..5d348d7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.4.adm
@@ -0,0 +1,27 @@
+{  }
+{ "address": null }
+{ "address": { "state": "CO", "country": "USA", "apt": null, "street": null } }
+{ "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "address": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "address": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "address": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "address": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "address": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "address": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "address": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "address": { "state": "ON", "country": "Canada", "apt": 9, "street": "10th" } }
+{ "address": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "address": { "state": "MO", "country": "USA", "apt": 9, "street": "18th" } }
+{ "address": { "state": "BC", "country": "Canada" } }
+{ "address": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "address": { "state": "ON", "country": "Canada" } }
+{ "address": { "state": "AL", "country": "USA" } }
+{ "address": { "state": "CA", "country": "USA" } }
+{ "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "address": { "state": "OR", "country": "USA" } }
+{ "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.5.adm
new file mode 100644
index 0000000..af9e575
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/distinct/record/record.5.adm
@@ -0,0 +1,27 @@
+{  }
+{ "address": null }
+{ "address": { "state": "CO", "country": "USA", "street": null, "apt": null } }
+{ "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "address": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "address": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "address": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "address": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "address": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "address": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "address": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "address": { "state": "ON", "country": "Canada", "street": "10th", "apt": 9 } }
+{ "address": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "address": { "state": "MO", "country": "USA", "street": "18th", "apt": 9 } }
+{ "address": { "state": "BC", "country": "Canada" } }
+{ "address": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "address": { "state": "ON", "country": "Canada" } }
+{ "address": { "state": "AL", "country": "USA" } }
+{ "address": { "state": "CA", "country": "USA" } }
+{ "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "address": { "state": "OR", "country": "USA" } }
+{ "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-array/gby-array.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-array/gby-array.5.adm
new file mode 100644
index 0000000..fe8e7c7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-array/gby-array.5.adm
@@ -0,0 +1,14 @@
+{ "count": 2 }
+{ "count": 2, "dept_ids": null }
+{ "count": 2, "dept_ids": [  ] }
+{ "count": 1, "dept_ids": [ 1, 5, 6 ] }
+{ "count": 1, "dept_ids": [ 1, 5, 9 ] }
+{ "count": 1, "dept_ids": [ 2 ] }
+{ "count": 2, "dept_ids": [ 3, 2, 8 ] }
+{ "count": 1, "dept_ids": [ 3, 5, 8 ] }
+{ "count": 2, "dept_ids": [ 4 ] }
+{ "count": 1, "dept_ids": [ 8, 2 ] }
+{ "count": 1, "dept_ids": [ 8, 2, 1, 7, 9 ] }
+{ "count": 2, "dept_ids": [ 9, 5, 2 ] }
+{ "count": 2, "dept_ids": [ 33, 11, 3, 16 ] }
+{ "count": 1, "dept_ids": [ 99, 12, 14, 15, 77 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-array/gby-array.6.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-array/gby-array.6.adm
new file mode 100644
index 0000000..fe8e7c7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-array/gby-array.6.adm
@@ -0,0 +1,14 @@
+{ "count": 2 }
+{ "count": 2, "dept_ids": null }
+{ "count": 2, "dept_ids": [  ] }
+{ "count": 1, "dept_ids": [ 1, 5, 6 ] }
+{ "count": 1, "dept_ids": [ 1, 5, 9 ] }
+{ "count": 1, "dept_ids": [ 2 ] }
+{ "count": 2, "dept_ids": [ 3, 2, 8 ] }
+{ "count": 1, "dept_ids": [ 3, 5, 8 ] }
+{ "count": 2, "dept_ids": [ 4 ] }
+{ "count": 1, "dept_ids": [ 8, 2 ] }
+{ "count": 1, "dept_ids": [ 8, 2, 1, 7, 9 ] }
+{ "count": 2, "dept_ids": [ 9, 5, 2 ] }
+{ "count": 2, "dept_ids": [ 33, 11, 3, 16 ] }
+{ "count": 1, "dept_ids": [ 99, 12, 14, 15, 77 ] }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.3.adm
new file mode 100644
index 0000000..611ce5a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.3.adm
@@ -0,0 +1,28 @@
+{ "count": 2 }
+{ "count": 3, "address": null }
+{ "count": 2, "address": {  } }
+{ "count": 1, "address": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
+{ "count": 2, "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "count": 1, "address": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "count": 1, "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "count": 2, "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "count": 1, "address": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "count": 2, "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "count": 1, "address": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "count": 1, "address": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "count": 1, "address": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "count": 1, "address": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "count": 1, "address": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "count": 1, "address": { "street": "10th", "apt": 9, "state": "ON", "country": "Canada" } }
+{ "count": 1, "address": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "count": 1, "address": { "street": "18th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "count": 2, "address": { "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada" } }
+{ "count": 3, "address": { "state": "AL", "country": "USA" } }
+{ "count": 3, "address": { "state": "CA", "country": "USA" } }
+{ "count": 1, "address": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "count": 3, "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "count": 1, "address": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "count": 2, "address": { "state": "OR", "country": "USA" } }
+{ "count": 1, "address": { "state": "OR", "zipcode": 97444, "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.4.adm
new file mode 100644
index 0000000..c42fdc9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.4.adm
@@ -0,0 +1,27 @@
+{ "count": 2 }
+{ "count": 3, "address": null }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "apt": null, "street": null } }
+{ "count": 2, "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "count": 2, "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "count": 2, "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada", "apt": 9, "street": "10th" } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "apt": 9, "street": "18th" } }
+{ "count": 2, "address": { "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada" } }
+{ "count": 3, "address": { "state": "AL", "country": "USA" } }
+{ "count": 3, "address": { "state": "CA", "country": "USA" } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "count": 3, "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "count": 2, "address": { "state": "OR", "country": "USA" } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.5.adm
new file mode 100644
index 0000000..4fa58f4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.5.adm
@@ -0,0 +1,27 @@
+{ "count": 2 }
+{ "count": 3, "address": null }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "street": null, "apt": null } }
+{ "count": 2, "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "count": 2, "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "count": 2, "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada", "street": "10th", "apt": 9 } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "street": "18th", "apt": 9 } }
+{ "count": 2, "address": { "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada" } }
+{ "count": 3, "address": { "state": "AL", "country": "USA" } }
+{ "count": 3, "address": { "state": "CA", "country": "USA" } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "count": 3, "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "count": 2, "address": { "state": "OR", "country": "USA" } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.6.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.6.adm
new file mode 100644
index 0000000..611ce5a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.6.adm
@@ -0,0 +1,28 @@
+{ "count": 2 }
+{ "count": 3, "address": null }
+{ "count": 2, "address": {  } }
+{ "count": 1, "address": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
+{ "count": 2, "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "count": 1, "address": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "count": 1, "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "count": 2, "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "count": 1, "address": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "count": 2, "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "count": 1, "address": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "count": 1, "address": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "count": 1, "address": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "count": 1, "address": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "count": 1, "address": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "count": 1, "address": { "street": "10th", "apt": 9, "state": "ON", "country": "Canada" } }
+{ "count": 1, "address": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "count": 1, "address": { "street": "18th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "count": 2, "address": { "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada" } }
+{ "count": 3, "address": { "state": "AL", "country": "USA" } }
+{ "count": 3, "address": { "state": "CA", "country": "USA" } }
+{ "count": 1, "address": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "count": 3, "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "count": 1, "address": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "count": 2, "address": { "state": "OR", "country": "USA" } }
+{ "count": 1, "address": { "state": "OR", "zipcode": 97444, "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.7.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.7.adm
new file mode 100644
index 0000000..c42fdc9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.7.adm
@@ -0,0 +1,27 @@
+{ "count": 2 }
+{ "count": 3, "address": null }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "apt": null, "street": null } }
+{ "count": 2, "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "count": 2, "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "count": 2, "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada", "apt": 9, "street": "10th" } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "apt": 9, "street": "18th" } }
+{ "count": 2, "address": { "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada" } }
+{ "count": 3, "address": { "state": "AL", "country": "USA" } }
+{ "count": 3, "address": { "state": "CA", "country": "USA" } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "count": 3, "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "count": 2, "address": { "state": "OR", "country": "USA" } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.8.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.8.adm
new file mode 100644
index 0000000..4fa58f4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/group-by/gby-record/gby-record.8.adm
@@ -0,0 +1,27 @@
+{ "count": 2 }
+{ "count": 3, "address": null }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "street": null, "apt": null } }
+{ "count": 2, "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "count": 2, "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "count": 2, "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada", "street": "10th", "apt": 9 } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "count": 1, "address": { "state": "MO", "country": "USA", "street": "18th", "apt": 9 } }
+{ "count": 2, "address": { "state": "BC", "country": "Canada" } }
+{ "count": 1, "address": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "count": 1, "address": { "state": "ON", "country": "Canada" } }
+{ "count": 3, "address": { "state": "AL", "country": "USA" } }
+{ "count": 3, "address": { "state": "CA", "country": "USA" } }
+{ "count": 1, "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "count": 3, "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "count": 1, "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "count": 2, "address": { "state": "OR", "country": "USA" } }
+{ "count": 1, "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.03.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.03.adm
new file mode 100644
index 0000000..ed4cfc9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.03.adm
@@ -0,0 +1,57 @@
+{ "id1": 2, "id2": 2, "add1": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" }, "add2": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add1": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" }, "add2": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add1": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" }, "add2": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add1": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" }, "add2": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add1": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" }, "add2": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "zipcode": 92212, "country": "USA" }, "add2": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 19, "id2": 24, "add1": {  }, "add2": {  } }
+{ "id1": 21, "id2": 21, "add1": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add1": { "street": "16th", "state": "BC", "country": "Canada" }, "add2": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add1": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" }, "add2": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 26, "id2": 24, "add1": {  }, "add2": {  } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" }, "add2": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add1": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" }, "add2": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.04.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.04.adm
new file mode 100644
index 0000000..3ecd74e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.04.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add2": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add1": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add1": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add1": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add2": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add1": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add1": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add1": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 21, "id2": 21, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add1": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add2": { "state": "BC", "country": "Canada", "street": "16th" }, "add1": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add1": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 27, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add1": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add1": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.05.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.05.adm
new file mode 100644
index 0000000..c499cb9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.05.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add2": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add1": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add2": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add1": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add2": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add1": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add1": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add2": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add2": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add1": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add1": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 21, "id2": 21, "add2": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add2": { "state": "BC", "country": "Canada", "street": "16th" }, "add1": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add1": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 27, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add2": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add1": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add2": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add1": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.06.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.06.adm
new file mode 100644
index 0000000..fd4ae68
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.06.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add2": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add2": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add2": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add2": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add2": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add2": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add2": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add2": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add2": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.07.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.07.adm
new file mode 100644
index 0000000..c77e071
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.07.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.08.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.08.adm
new file mode 100644
index 0000000..5ca90d2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.08.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.09.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.09.adm
new file mode 100644
index 0000000..80d7c58
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.09.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add2": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add2": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add2": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add2": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add2": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add2": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add2": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add2": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.10.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.10.adm
new file mode 100644
index 0000000..71c2dd2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.10.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add2": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.11.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.11.adm
new file mode 100644
index 0000000..8adc4bf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.11.adm
@@ -0,0 +1,55 @@
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.12.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.12.adm
new file mode 100644
index 0000000..bd37428
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.12.adm
@@ -0,0 +1,69 @@
+{ "id1": 1, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 2, "id2": 2, "add1": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" }, "add2": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add1": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" }, "add2": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add1": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" }, "add2": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add1": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" }, "add2": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add1": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" }, "add2": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 10, "add1": { "state": "OR", "zipcode": 97444, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "zipcode": 92212, "country": "USA" }, "add2": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 12, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 19, "id2": 24, "add1": {  }, "add2": {  } }
+{ "id1": 20, "add1": { "street": "10th", "apt": 9, "state": "ON", "country": "Canada" } }
+{ "id1": 21, "id2": 21, "add1": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add1": { "street": "16th", "state": "BC", "country": "Canada" }, "add2": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add1": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" }, "add2": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "street": "18th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 26, "id2": 24, "add1": {  }, "add2": {  } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
+{ "id1": 34, "id2": 34, "add1": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" }, "add2": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add1": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" }, "add2": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.13.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.13.adm
new file mode 100644
index 0000000..65156dd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.13.adm
@@ -0,0 +1,69 @@
+{ "id1": 1, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 2, "id2": 2, "add2": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add1": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add1": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add1": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add2": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add1": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add1": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 10, "add1": { "state": "OR", "zipcode": 97444, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add1": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 12, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 19, "add1": {  } }
+{ "id1": 20, "add1": { "street": "10th", "apt": 9, "state": "ON", "country": "Canada" } }
+{ "id1": 21, "id2": 21, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add1": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add2": { "state": "BC", "country": "Canada", "street": "16th" }, "add1": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add1": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "street": "18th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 26, "add1": {  } }
+{ "id1": 27, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
+{ "id1": 34, "id2": 34, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add1": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add1": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.14.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.14.adm
new file mode 100644
index 0000000..197eb1c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.14.adm
@@ -0,0 +1,69 @@
+{ "id1": 1, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 2, "id2": 2, "add2": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add1": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add2": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add1": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add2": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add1": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add1": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add2": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add2": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add1": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 10, "add1": { "state": "OR", "zipcode": 97444, "country": "USA" } }
+{ "id1": 11, "id2": 11, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add1": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 12, "add1": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 13, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 19, "add1": {  } }
+{ "id1": 20, "add1": { "street": "10th", "apt": 9, "state": "ON", "country": "Canada" } }
+{ "id1": 21, "id2": 21, "add2": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add2": { "state": "BC", "country": "Canada", "street": "16th" }, "add1": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add1": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "street": "18th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 26, "add1": {  } }
+{ "id1": 27, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add2": { "state": "BC", "country": "Canada" }, "add1": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
+{ "id1": 34, "id2": 34, "add2": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add1": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add2": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add1": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add1": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add1": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add1": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add2": { "state": "OR", "country": "USA" }, "add1": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add2": { "state": "AL", "country": "USA" }, "add1": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add2": { "state": "CA", "country": "USA" }, "add1": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.15.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.15.adm
new file mode 100644
index 0000000..a14ebdb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.15.adm
@@ -0,0 +1,67 @@
+{ "id1": 1, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add2": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add2": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add2": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add2": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add2": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add2": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 10, "add1": { "state": "OR", "country": "USA", "zipcode": 97444 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 12, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 20, "add1": { "state": "ON", "country": "Canada", "apt": 9, "street": "10th" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add2": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "18th" } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "state": "CO", "country": "USA", "apt": null, "street": null } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add2": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add2": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.16.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.16.adm
new file mode 100644
index 0000000..dcc7f0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.16.adm
@@ -0,0 +1,67 @@
+{ "id1": 1, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 10, "add1": { "state": "OR", "country": "USA", "zipcode": 97444 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 12, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 20, "add1": { "state": "ON", "country": "Canada", "apt": 9, "street": "10th" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "18th" } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "state": "CO", "country": "USA", "apt": null, "street": null } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.17.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.17.adm
new file mode 100644
index 0000000..ff08a44
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.17.adm
@@ -0,0 +1,67 @@
+{ "id1": 1, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 10, "add1": { "state": "OR", "country": "USA", "zipcode": 97444 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 12, "add1": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 20, "add1": { "state": "ON", "country": "Canada", "apt": 9, "street": "10th" } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "state": "MO", "country": "USA", "apt": 9, "street": "18th" } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "state": "CO", "country": "USA", "apt": null, "street": null } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "apt": null, "street": "10th" }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.18.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.18.adm
new file mode 100644
index 0000000..dd0a0f9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.18.adm
@@ -0,0 +1,67 @@
+{ "id1": 1, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add2": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add2": { "street": "12th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add2": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add2": { "street": "10th", "apt": 9, "state": "MO", "country": "USA" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add2": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add2": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 10, "add1": { "state": "OR", "country": "USA", "zipcode": 97444 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "zipcode": 92212, "country": "USA" } }
+{ "id1": 12, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 20, "add1": { "state": "ON", "country": "Canada", "street": "10th", "apt": 9 } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "street": "16th", "state": "BC", "country": "Canada" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "state": "MO", "country": "USA", "street": "18th", "apt": 9 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "state": "CO", "country": "USA", "street": null, "apt": null } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add2": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add2": { "street": "18th", "apt": 8, "state": "AL", "zipcode": 33212, "country": "USA" } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.19.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.19.adm
new file mode 100644
index 0000000..7cac215
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.19.adm
@@ -0,0 +1,67 @@
+{ "id1": 1, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "12th", "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add2": { "state": "MO", "country": "USA", "apt": 9, "street": "10th" } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 10, "add1": { "state": "OR", "country": "USA", "zipcode": 97444 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 12, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 20, "add1": { "state": "ON", "country": "Canada", "street": "10th", "apt": 9 } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "state": "MO", "country": "USA", "street": "18th", "apt": 9 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "state": "CO", "country": "USA", "street": null, "apt": null } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "apt": 8, "street": "18th", "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.20.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.20.adm
new file mode 100644
index 0000000..54f090e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/join/hash_join_record/hash_join_record.20.adm
@@ -0,0 +1,67 @@
+{ "id1": 1, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 2, "id2": 2, "add1": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
+{ "id1": 3, "id2": 3, "add1": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "12th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 4, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 4, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 5, "id2": 5, "add1": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 6, "id2": 6, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": 9 } }
+{ "id1": 7, "id2": 7, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 }, "add2": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
+{ "id1": 8, "id2": 8, "add1": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 }, "add2": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
+{ "id1": 9, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 9, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 10, "add1": { "state": "OR", "country": "USA", "zipcode": 97444 } }
+{ "id1": 11, "id2": 11, "add1": { "state": "CA", "country": "USA", "zipcode": 92212 }, "add2": { "state": "CA", "country": "USA", "zipcode": 92212 } }
+{ "id1": 12, "add1": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
+{ "id1": 13, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 13, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 14, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 14, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 15, "add1": null }
+{ "id1": 16 }
+{ "id1": 17 }
+{ "id1": 18, "add1": null }
+{ "id1": 20, "add1": { "state": "ON", "country": "Canada", "street": "10th", "apt": 9 } }
+{ "id1": 21, "id2": 21, "add1": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 22, "id2": 22, "add1": { "state": "BC", "country": "Canada", "street": "16th" }, "add2": { "state": "BC", "country": "Canada", "street": "16th" } }
+{ "id1": 23, "id2": 23, "add1": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 }, "add2": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
+{ "id1": 24, "add1": null }
+{ "id1": 25, "add1": { "state": "MO", "country": "USA", "street": "18th", "apt": 9 } }
+{ "id1": 27, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 27, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 28, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 28, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 29, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 29, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 30, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 30, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 30, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 31, "id2": 31, "add1": { "state": "BC", "country": "Canada" }, "add2": { "state": "BC", "country": "Canada" } }
+{ "id1": 32, "add1": { "state": "ON", "country": "Canada" } }
+{ "id1": 33, "add1": { "state": "CO", "country": "USA", "street": null, "apt": null } }
+{ "id1": 34, "id2": 34, "add1": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 }, "add2": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
+{ "id1": 35, "id2": 35, "add1": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 }, "add2": { "state": "AL", "country": "USA", "street": "18th", "apt": 8, "zipcode": 33212 } }
+{ "id1": 36, "id2": 4, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 13, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 36, "id2": 36, "add1": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 }, "add2": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id1": 37, "id2": 14, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 37, "id2": 37, "add1": { "state": "MO", "country": "USA", "street": "10th", "apt": null }, "add2": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id1": 38, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 38, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 39, "id2": 9, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 39, "id2": 39, "add1": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 }, "add2": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id1": 40, "id2": 29, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 40, "id2": 40, "add1": { "state": "OR", "country": "USA" }, "add2": { "state": "OR", "country": "USA" } }
+{ "id1": 41, "id2": 28, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 38, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 41, "id2": 41, "add1": { "state": "AL", "country": "USA" }, "add2": { "state": "AL", "country": "USA" } }
+{ "id1": 42, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 42, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 27, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 42, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
+{ "id1": 43, "id2": 43, "add1": { "state": "CA", "country": "USA" }, "add2": { "state": "CA", "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.3.adm
index 2568592..57efe5c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.3.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.3.adm
@@ -7,12 +7,14 @@
 { "id": 26, "name": "Nancy", "address": {  } }
 { "id": 33, "name": "Tiger", "address": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
 { "id": 14, "name": "Jay", "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id": 37, "name": "James", "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
 { "id": 2, "name": "Isac", "address": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
 { "id": 7, "name": "Suzanna", "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
 { "id": 1, "name": "Margarita", "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 12, "name": "John", "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 5, "name": "Von", "address": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 9, "name": "Woodrow", "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id": 39, "name": "Flex", "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
 { "id": 21, "name": "Ken", "address": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
 { "id": 34, "name": "Nicole", "address": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
 { "id": 8, "name": "Nicole", "address": { "street": "16th", "apt": 7, "state": "OR", "zipcode": 97403, "country": "USA" } }
@@ -26,10 +28,16 @@
 { "id": 22, "name": "Fend", "address": { "street": "16th", "state": "BC", "country": "Canada" } }
 { "id": 32, "name": "May", "address": { "state": "ON", "country": "Canada" } }
 { "id": 28, "name": "Lory", "address": { "state": "AL", "country": "USA" } }
+{ "id": 38, "name": "Charles", "address": { "state": "AL", "country": "USA" } }
+{ "id": 41, "name": "Roy", "address": { "state": "AL", "country": "USA" } }
 { "id": 27, "name": "Eric", "address": { "state": "CA", "country": "USA" } }
+{ "id": 42, "name": "Albert", "address": { "state": "CA", "country": "USA" } }
+{ "id": 43, "name": "Jacob", "address": { "state": "CA", "country": "USA" } }
 { "id": 11, "name": "Nicholas", "address": { "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 4, "name": "Nicholas", "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
 { "id": 13, "name": "Steve", "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id": 36, "name": "Smith", "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
 { "id": 23, "name": "Adrian", "address": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
 { "id": 29, "name": "David", "address": { "state": "OR", "country": "USA" } }
+{ "id": 40, "name": "Simone", "address": { "state": "OR", "country": "USA" } }
 { "id": 10, "name": "Bram", "address": { "state": "OR", "zipcode": 97444, "country": "USA" } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.4.adm
index 3627e36..a9f3ec2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.4.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.4.adm
@@ -5,12 +5,14 @@
 { "id": 24, "name": "Trent", "address": null }
 { "id": 33, "name": "Tiger", "address": { "state": "CO", "country": "USA", "apt": null, "street": null } }
 { "id": 14, "name": "Jay", "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id": 37, "name": "James", "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
 { "id": 2, "name": "Isac", "address": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
 { "id": 7, "name": "Suzanna", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
 { "id": 1, "name": "Margarita", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
 { "id": 12, "name": "John", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
 { "id": 5, "name": "Von", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
 { "id": 9, "name": "Woodrow", "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id": 39, "name": "Flex", "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
 { "id": 21, "name": "Ken", "address": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
 { "id": 34, "name": "Nicole", "address": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
 { "id": 8, "name": "Nicole", "address": { "state": "OR", "country": "USA", "apt": 7, "street": "16th", "zipcode": 97403 } }
@@ -24,10 +26,16 @@
 { "id": 22, "name": "Fend", "address": { "state": "BC", "country": "Canada", "street": "16th" } }
 { "id": 32, "name": "May", "address": { "state": "ON", "country": "Canada" } }
 { "id": 28, "name": "Lory", "address": { "state": "AL", "country": "USA" } }
+{ "id": 38, "name": "Charles", "address": { "state": "AL", "country": "USA" } }
+{ "id": 41, "name": "Roy", "address": { "state": "AL", "country": "USA" } }
 { "id": 27, "name": "Eric", "address": { "state": "CA", "country": "USA" } }
+{ "id": 42, "name": "Albert", "address": { "state": "CA", "country": "USA" } }
+{ "id": 43, "name": "Jacob", "address": { "state": "CA", "country": "USA" } }
 { "id": 11, "name": "Nicholas", "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
 { "id": 4, "name": "Nicholas", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 13, "name": "Steve", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id": 36, "name": "Smith", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 23, "name": "Adrian", "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
 { "id": 29, "name": "David", "address": { "state": "OR", "country": "USA" } }
+{ "id": 40, "name": "Simone", "address": { "state": "OR", "country": "USA" } }
 { "id": 10, "name": "Bram", "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.5.adm
index 013685c..5e002a0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.5.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.5.adm
@@ -5,12 +5,14 @@
 { "id": 24, "name": "Trent", "address": null }
 { "id": 33, "name": "Tiger", "address": { "state": "CO", "country": "USA", "street": null, "apt": null } }
 { "id": 14, "name": "Jay", "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id": 37, "name": "James", "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
 { "id": 2, "name": "Isac", "address": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
 { "id": 7, "name": "Suzanna", "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
 { "id": 1, "name": "Margarita", "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
 { "id": 12, "name": "John", "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
 { "id": 5, "name": "Von", "address": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
 { "id": 9, "name": "Woodrow", "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id": 39, "name": "Flex", "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
 { "id": 21, "name": "Ken", "address": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
 { "id": 34, "name": "Nicole", "address": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
 { "id": 8, "name": "Nicole", "address": { "state": "OR", "country": "USA", "street": "16th", "apt": 7, "zipcode": 97403 } }
@@ -24,10 +26,16 @@
 { "id": 22, "name": "Fend", "address": { "state": "BC", "country": "Canada", "street": "16th" } }
 { "id": 32, "name": "May", "address": { "state": "ON", "country": "Canada" } }
 { "id": 28, "name": "Lory", "address": { "state": "AL", "country": "USA" } }
+{ "id": 38, "name": "Charles", "address": { "state": "AL", "country": "USA" } }
+{ "id": 41, "name": "Roy", "address": { "state": "AL", "country": "USA" } }
 { "id": 27, "name": "Eric", "address": { "state": "CA", "country": "USA" } }
+{ "id": 42, "name": "Albert", "address": { "state": "CA", "country": "USA" } }
+{ "id": 43, "name": "Jacob", "address": { "state": "CA", "country": "USA" } }
 { "id": 11, "name": "Nicholas", "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
 { "id": 4, "name": "Nicholas", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 13, "name": "Steve", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id": 36, "name": "Smith", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 23, "name": "Adrian", "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
 { "id": 29, "name": "David", "address": { "state": "OR", "country": "USA" } }
+{ "id": 40, "name": "Simone", "address": { "state": "OR", "country": "USA" } }
 { "id": 10, "name": "Bram", "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.6.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.6.adm
index 7ef6e19..11d1800 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.6.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.6.adm
@@ -1,11 +1,17 @@
 { "id": 10, "name": "Bram", "address": { "state": "OR", "zipcode": 97444, "country": "USA" } }
 { "id": 29, "name": "David", "address": { "state": "OR", "country": "USA" } }
+{ "id": 40, "name": "Simone", "address": { "state": "OR", "country": "USA" } }
 { "id": 23, "name": "Adrian", "address": { "street": "14th", "state": "MN", "zipcode": 78812, "country": "USA" } }
 { "id": 4, "name": "Nicholas", "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
 { "id": 13, "name": "Steve", "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
+{ "id": 36, "name": "Smith", "address": { "street": "19th", "state": "IN", "zipcode": 88232, "country": "USA" } }
 { "id": 11, "name": "Nicholas", "address": { "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 27, "name": "Eric", "address": { "state": "CA", "country": "USA" } }
+{ "id": 42, "name": "Albert", "address": { "state": "CA", "country": "USA" } }
+{ "id": 43, "name": "Jacob", "address": { "state": "CA", "country": "USA" } }
 { "id": 28, "name": "Lory", "address": { "state": "AL", "country": "USA" } }
+{ "id": 38, "name": "Charles", "address": { "state": "AL", "country": "USA" } }
+{ "id": 41, "name": "Roy", "address": { "state": "AL", "country": "USA" } }
 { "id": 32, "name": "May", "address": { "state": "ON", "country": "Canada" } }
 { "id": 22, "name": "Fend", "address": { "street": "16th", "state": "BC", "country": "Canada" } }
 { "id": 30, "name": "Rock", "address": { "state": "BC", "country": "Canada" } }
@@ -19,12 +25,14 @@
 { "id": 34, "name": "Nicole", "address": { "street": null, "apt": 7, "state": "OR", "zipcode": 97402, "country": "USA" } }
 { "id": 21, "name": "Ken", "address": { "street": "15th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
 { "id": 9, "name": "Woodrow", "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
+{ "id": 39, "name": "Flex", "address": { "street": "13th", "apt": 6, "state": "CO", "zipcode": 44321, "country": "USA" } }
 { "id": 5, "name": "Von", "address": { "street": "17th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 1, "name": "Margarita", "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 12, "name": "John", "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92212, "country": "USA" } }
 { "id": 7, "name": "Suzanna", "address": { "street": "11th", "apt": 2, "state": "CA", "zipcode": 92211, "country": "USA" } }
 { "id": 2, "name": "Isac", "address": { "street": "14th", "apt": 1, "state": "MN", "zipcode": 78812, "country": "USA" } }
 { "id": 14, "name": "Jay", "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
+{ "id": 37, "name": "James", "address": { "street": "10th", "apt": null, "state": "MO", "country": "USA" } }
 { "id": 33, "name": "Tiger", "address": { "street": null, "apt": null, "state": "CO", "country": "USA" } }
 { "id": 19, "name": "Mart", "address": {  } }
 { "id": 26, "name": "Nancy", "address": {  } }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.7.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.7.adm
index 3e6b39e..8ea850f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.7.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.7.adm
@@ -1,11 +1,17 @@
 { "id": 10, "name": "Bram", "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
 { "id": 29, "name": "David", "address": { "state": "OR", "country": "USA" } }
+{ "id": 40, "name": "Simone", "address": { "state": "OR", "country": "USA" } }
 { "id": 23, "name": "Adrian", "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
 { "id": 4, "name": "Nicholas", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 13, "name": "Steve", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id": 36, "name": "Smith", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 11, "name": "Nicholas", "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
 { "id": 27, "name": "Eric", "address": { "state": "CA", "country": "USA" } }
+{ "id": 42, "name": "Albert", "address": { "state": "CA", "country": "USA" } }
+{ "id": 43, "name": "Jacob", "address": { "state": "CA", "country": "USA" } }
 { "id": 28, "name": "Lory", "address": { "state": "AL", "country": "USA" } }
+{ "id": 38, "name": "Charles", "address": { "state": "AL", "country": "USA" } }
+{ "id": 41, "name": "Roy", "address": { "state": "AL", "country": "USA" } }
 { "id": 32, "name": "May", "address": { "state": "ON", "country": "Canada" } }
 { "id": 22, "name": "Fend", "address": { "state": "BC", "country": "Canada", "street": "16th" } }
 { "id": 30, "name": "Rock", "address": { "state": "BC", "country": "Canada" } }
@@ -19,12 +25,14 @@
 { "id": 34, "name": "Nicole", "address": { "state": "OR", "country": "USA", "apt": 7, "street": null, "zipcode": 97402 } }
 { "id": 21, "name": "Ken", "address": { "state": "CO", "country": "USA", "apt": 6, "street": "15th", "zipcode": 44321 } }
 { "id": 9, "name": "Woodrow", "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
+{ "id": 39, "name": "Flex", "address": { "state": "CO", "country": "USA", "apt": 6, "street": "13th", "zipcode": 44321 } }
 { "id": 5, "name": "Von", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "17th", "zipcode": 92212 } }
 { "id": 1, "name": "Margarita", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
 { "id": 12, "name": "John", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92212 } }
 { "id": 7, "name": "Suzanna", "address": { "state": "CA", "country": "USA", "apt": 2, "street": "11th", "zipcode": 92211 } }
 { "id": 2, "name": "Isac", "address": { "state": "MN", "country": "USA", "apt": 1, "street": "14th", "zipcode": 78812 } }
 { "id": 14, "name": "Jay", "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
+{ "id": 37, "name": "James", "address": { "state": "MO", "country": "USA", "apt": null, "street": "10th" } }
 { "id": 33, "name": "Tiger", "address": { "state": "CO", "country": "USA", "apt": null, "street": null } }
 { "id": 15, "name": "Jim", "address": null }
 { "id": 18, "name": "Kayle", "address": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.8.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.8.adm
index 847c95c..ccfece2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.8.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/sorting/records/records.8.adm
@@ -1,11 +1,17 @@
 { "id": 10, "name": "Bram", "address": { "state": "OR", "country": "USA", "zipcode": 97444 } }
 { "id": 29, "name": "David", "address": { "state": "OR", "country": "USA" } }
+{ "id": 40, "name": "Simone", "address": { "state": "OR", "country": "USA" } }
 { "id": 23, "name": "Adrian", "address": { "state": "MN", "country": "USA", "street": "14th", "zipcode": 78812 } }
 { "id": 4, "name": "Nicholas", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 13, "name": "Steve", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
+{ "id": 36, "name": "Smith", "address": { "state": "IN", "country": "USA", "street": "19th", "zipcode": 88232 } }
 { "id": 11, "name": "Nicholas", "address": { "state": "CA", "country": "USA", "zipcode": 92212 } }
 { "id": 27, "name": "Eric", "address": { "state": "CA", "country": "USA" } }
+{ "id": 42, "name": "Albert", "address": { "state": "CA", "country": "USA" } }
+{ "id": 43, "name": "Jacob", "address": { "state": "CA", "country": "USA" } }
 { "id": 28, "name": "Lory", "address": { "state": "AL", "country": "USA" } }
+{ "id": 38, "name": "Charles", "address": { "state": "AL", "country": "USA" } }
+{ "id": 41, "name": "Roy", "address": { "state": "AL", "country": "USA" } }
 { "id": 32, "name": "May", "address": { "state": "ON", "country": "Canada" } }
 { "id": 22, "name": "Fend", "address": { "state": "BC", "country": "Canada", "street": "16th" } }
 { "id": 30, "name": "Rock", "address": { "state": "BC", "country": "Canada" } }
@@ -19,12 +25,14 @@
 { "id": 34, "name": "Nicole", "address": { "state": "OR", "country": "USA", "street": null, "apt": 7, "zipcode": 97402 } }
 { "id": 21, "name": "Ken", "address": { "state": "CO", "country": "USA", "street": "15th", "apt": 6, "zipcode": 44321 } }
 { "id": 9, "name": "Woodrow", "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
+{ "id": 39, "name": "Flex", "address": { "state": "CO", "country": "USA", "street": "13th", "apt": 6, "zipcode": 44321 } }
 { "id": 5, "name": "Von", "address": { "state": "CA", "country": "USA", "street": "17th", "apt": 2, "zipcode": 92212 } }
 { "id": 1, "name": "Margarita", "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
 { "id": 12, "name": "John", "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92212 } }
 { "id": 7, "name": "Suzanna", "address": { "state": "CA", "country": "USA", "street": "11th", "apt": 2, "zipcode": 92211 } }
 { "id": 2, "name": "Isac", "address": { "state": "MN", "country": "USA", "street": "14th", "apt": 1, "zipcode": 78812 } }
 { "id": 14, "name": "Jay", "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
+{ "id": 37, "name": "James", "address": { "state": "MO", "country": "USA", "street": "10th", "apt": null } }
 { "id": 33, "name": "Tiger", "address": { "state": "CO", "country": "USA", "street": null, "apt": null } }
 { "id": 15, "name": "Jim", "address": null }
 { "id": 18, "name": "Kayle", "address": null }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index ea6205f..6d90c86 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -4008,6 +4008,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="group-by">
+      <compilation-unit name="gby-record">
+        <output-dir compare="Text">gby-record</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="group-by">
       <compilation-unit name="core-01">
         <output-dir compare="Text">core-01</output-dir>
       </compilation-unit>
@@ -4621,6 +4626,11 @@
         <output-dir compare="Text">hash_join_array</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="join">
+      <compilation-unit name="hash_join_record">
+        <output-dir compare="Text">hash_join_record</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="list">
     <test-case FilePath="list">
@@ -10345,6 +10355,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="distinct">
+      <compilation-unit name="record">
+        <output-dir compare="Text">record</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="distinct">
       <compilation-unit name="query-issue443">
         <output-dir compare="Text">query-issue443</output-dir>
       </compilation-unit>
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/CompareHashUtil.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/CompareHashUtil.java
new file mode 100644
index 0000000..833dde1
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/CompareHashUtil.java
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+package org.apache.asterix.dataflow.data.nontagged;
+
+import static org.apache.asterix.om.types.ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
+import static org.apache.asterix.om.types.ATypeTag.VALUE_TYPE_MAPPING;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.PriorityQueue;
+
+import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
+import org.apache.asterix.om.pointables.base.IVisitablePointable;
+import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.IAType;
+import org.apache.asterix.om.types.TypeTagUtil;
+import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class CompareHashUtil {
+
+    private CompareHashUtil() {
+    }
+
+    public static Comparator<IVisitablePointable> createFieldNamesComp(IBinaryComparator stringComp) {
+        return new Comparator<IVisitablePointable>() {
+            @Override
+            public int compare(IVisitablePointable name1, IVisitablePointable name2) {
+                try {
+                    return stringComp.compare(name1.getByteArray(), name1.getStartOffset() + 1, name1.getLength() - 1,
+                            name2.getByteArray(), name2.getStartOffset() + 1, name2.getLength() - 1);
+                } catch (HyracksDataException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        };
+    }
+
+    public static int addToHeap(List<IVisitablePointable> recordFNames, List<IVisitablePointable> recordFValues,
+            PriorityQueue<IVisitablePointable> names) {
+        // do not add fields whose value is missing, they don't exist in reality
+        int length = recordFNames.size();
+        IVisitablePointable fieldValue;
+        int count = 0;
+        for (int i = 0; i < length; i++) {
+            fieldValue = recordFValues.get(i);
+            if (fieldValue.getByteArray()[fieldValue.getStartOffset()] != SERIALIZED_MISSING_TYPE_TAG) {
+                names.add(recordFNames.get(i));
+                count++;
+            }
+        }
+        return count;
+    }
+
+    public static int getIndex(List<IVisitablePointable> names, IVisitablePointable instance) {
+        int size = names.size();
+        for (int i = 0; i < size; i++) {
+            if (instance == names.get(i)) {
+                return i;
+            }
+        }
+        throw new IllegalStateException();
+    }
+
+    public static IAType getType(ARecordType recordType, int fieldIdx, IVisitablePointable fieldValue)
+            throws HyracksDataException {
+        IAType[] fieldTypes = recordType.getFieldTypes();
+        if (fieldIdx >= fieldTypes.length) {
+            byte tag = fieldValue.getByteArray()[fieldValue.getStartOffset()];
+            ATypeTag fieldRuntimeTag = VALUE_TYPE_MAPPING[tag];
+            return fieldRuntimeTag.isDerivedType() ? DefaultOpenFieldType.getDefaultOpenFieldType(fieldRuntimeTag)
+                    : TypeTagUtil.getBuiltinTypeByTag(fieldRuntimeTag);
+        }
+        return fieldTypes[fieldIdx];
+    }
+}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AbstractAGenericBinaryComparator.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AbstractAGenericBinaryComparator.java
index b2759e8..aa6a168 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AbstractAGenericBinaryComparator.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/comparators/AbstractAGenericBinaryComparator.java
@@ -18,18 +18,15 @@
  */
 package org.apache.asterix.dataflow.data.nontagged.comparators;
 
-import static org.apache.asterix.om.types.ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
-import static org.apache.asterix.om.types.ATypeTag.VALUE_TYPE_MAPPING;
-
 import java.io.IOException;
 import java.util.Comparator;
 import java.util.List;
 import java.util.PriorityQueue;
 
 import org.apache.asterix.dataflow.data.common.ListAccessorUtil;
+import org.apache.asterix.dataflow.data.nontagged.CompareHashUtil;
 import org.apache.asterix.om.pointables.ARecordVisitablePointable;
 import org.apache.asterix.om.pointables.PointableAllocator;
-import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
 import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
 import org.apache.asterix.om.types.ARecordType;
@@ -37,7 +34,6 @@
 import org.apache.asterix.om.types.AbstractCollectionType;
 import org.apache.asterix.om.types.EnumDeserializer;
 import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.types.TypeTagUtil;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.om.types.hierachy.ITypeConvertComputer;
 import org.apache.asterix.om.util.container.IObjectPool;
@@ -132,7 +128,7 @@
         this.storageAllocator = new ListObjectPool<>(ObjectFactories.STORAGE_FACTORY);
         this.voidPointableAllocator = new ListObjectPool<>(ObjectFactories.VOID_FACTORY);
         this.recordAllocator = new PointableAllocator();
-        this.fieldNamesComparator = createFieldNamesComp(ascStrComp);
+        this.fieldNamesComparator = CompareHashUtil.createFieldNamesComp(ascStrComp);
         this.heapAllocator = new ListObjectPool<>((type) -> new PriorityQueue<>(fieldNamesComparator));
     }
 
@@ -407,8 +403,8 @@
             rightNamesHeap = heapAllocator.allocate(null);
             leftNamesHeap.clear();
             rightNamesHeap.clear();
-            int numLeftValuedFields = addToHeap(leftFieldsNames, leftFieldsValues, leftNamesHeap);;
-            int numRightValuedFields = addToHeap(rightFieldsNames, rightFieldsValues, rightNamesHeap);
+            int numLeftValuedFields = CompareHashUtil.addToHeap(leftFieldsNames, leftFieldsValues, leftNamesHeap);
+            int numRightValuedFields = CompareHashUtil.addToHeap(rightFieldsNames, rightFieldsValues, rightNamesHeap);
             if (numLeftValuedFields == 0 && numRightValuedFields == 0) {
                 return 0;
             } else if (numLeftValuedFields == 0) {
@@ -431,12 +427,12 @@
                     return result;
                 }
                 // then compare the values if the names are equal
-                leftFieldIdx = getIndex(leftFieldsNames, leftFieldName);
-                rightFieldIdx = getIndex(rightFieldsNames, rightFieldName);
+                leftFieldIdx = CompareHashUtil.getIndex(leftFieldsNames, leftFieldName);
+                rightFieldIdx = CompareHashUtil.getIndex(rightFieldsNames, rightFieldName);
                 leftFieldValue = leftFieldsValues.get(leftFieldIdx);
                 rightFieldValue = rightFieldsValues.get(rightFieldIdx);
-                leftFieldType = getType(leftRecordType, leftFieldIdx, leftFieldValue);
-                rightFieldType = getType(rightRecordType, rightFieldIdx, rightFieldValue);
+                leftFieldType = CompareHashUtil.getType(leftRecordType, leftFieldIdx, leftFieldValue);
+                rightFieldType = CompareHashUtil.getType(rightRecordType, rightFieldIdx, rightFieldValue);
 
                 result = compare(leftFieldType, leftFieldValue.getByteArray(), leftFieldValue.getStartOffset(),
                         leftFieldValue.getLength(), rightFieldType, rightFieldValue.getByteArray(),
@@ -458,56 +454,4 @@
             }
         }
     }
-
-    private static int addToHeap(List<IVisitablePointable> recordFNames, List<IVisitablePointable> recordFValues,
-            PriorityQueue<IVisitablePointable> names) {
-        // do not add fields whose value is missing, they don't exist in reality
-        int length = recordFNames.size();
-        IVisitablePointable fieldValue;
-        int count = 0;
-        for (int i = 0; i < length; i++) {
-            fieldValue = recordFValues.get(i);
-            if (fieldValue.getByteArray()[fieldValue.getStartOffset()] != SERIALIZED_MISSING_TYPE_TAG) {
-                names.add(recordFNames.get(i));
-                count++;
-            }
-        }
-        return count;
-    }
-
-    private static int getIndex(List<IVisitablePointable> names, IVisitablePointable instance) {
-        int size = names.size();
-        for (int i = 0; i < size; i++) {
-            if (instance == names.get(i)) {
-                return i;
-            }
-        }
-        throw new IllegalStateException();
-    }
-
-    private static IAType getType(ARecordType recordType, int fieldIdx, IVisitablePointable fieldValue)
-            throws HyracksDataException {
-        IAType[] fieldTypes = recordType.getFieldTypes();
-        if (fieldIdx >= fieldTypes.length) {
-            byte tag = fieldValue.getByteArray()[fieldValue.getStartOffset()];
-            ATypeTag fieldRuntimeTag = VALUE_TYPE_MAPPING[tag];
-            return fieldRuntimeTag.isDerivedType() ? DefaultOpenFieldType.getDefaultOpenFieldType(fieldRuntimeTag)
-                    : TypeTagUtil.getBuiltinTypeByTag(fieldRuntimeTag);
-        }
-        return fieldTypes[fieldIdx];
-    }
-
-    private static Comparator<IVisitablePointable> createFieldNamesComp(IBinaryComparator stringComp) {
-        return new Comparator<IVisitablePointable>() {
-            @Override
-            public int compare(IVisitablePointable name1, IVisitablePointable name2) {
-                try {
-                    return stringComp.compare(name1.getByteArray(), name1.getStartOffset() + 1, name1.getLength() - 1,
-                            name2.getByteArray(), name2.getStartOffset() + 1, name2.getLength() - 1);
-                } catch (HyracksDataException e) {
-                    throw new RuntimeException(e);
-                }
-            }
-        };
-    }
 }
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/hash/AMurmurHash3BinaryHashFunctionFamily.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/hash/AMurmurHash3BinaryHashFunctionFamily.java
index 0f0eb11..7cd69ab 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/hash/AMurmurHash3BinaryHashFunctionFamily.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/hash/AMurmurHash3BinaryHashFunctionFamily.java
@@ -20,9 +20,17 @@
 
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.Comparator;
+import java.util.List;
+import java.util.PriorityQueue;
 
 import org.apache.asterix.dataflow.data.common.ListAccessorUtil;
+import org.apache.asterix.dataflow.data.nontagged.CompareHashUtil;
+import org.apache.asterix.om.pointables.ARecordVisitablePointable;
+import org.apache.asterix.om.pointables.PointableAllocator;
+import org.apache.asterix.om.pointables.base.IVisitablePointable;
 import org.apache.asterix.om.typecomputer.impl.TypeComputeUtils;
+import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AbstractCollectionType;
 import org.apache.asterix.om.types.EnumDeserializer;
@@ -37,8 +45,10 @@
 import org.apache.hyracks.api.exceptions.ErrorCode;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.data.std.accessors.MurmurHash3BinaryHash;
+import org.apache.hyracks.data.std.accessors.PointableBinaryComparatorFactory;
 import org.apache.hyracks.data.std.api.IMutableValueStorage;
 import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 
 public class AMurmurHash3BinaryHashFunctionFamily implements IBinaryHashFunctionFamily {
@@ -75,12 +85,20 @@
         private final IObjectPool<IMutableValueStorage, ATypeTag> storageAllocator;
         private final IAType type;
         private final int seed;
+        // used for record hashing, sorting field names first
+        private final PointableAllocator recordAllocator;
+        private final IObjectPool<PriorityQueue<IVisitablePointable>, Void> heapAllocator;
+        private final Comparator<IVisitablePointable> fieldNamesComparator;
 
         private GenericHashFunction(IAType type, int seed) {
             this.type = type;
             this.seed = seed;
             this.voidPointableAllocator = new ListObjectPool<>(ObjectFactories.VOID_FACTORY);
             this.storageAllocator = new ListObjectPool<>(ObjectFactories.STORAGE_FACTORY);
+            this.recordAllocator = new PointableAllocator();
+            this.fieldNamesComparator = CompareHashUtil.createFieldNamesComp(
+                    new PointableBinaryComparatorFactory(UTF8StringPointable.FACTORY).createBinaryComparator());
+            this.heapAllocator = new ListObjectPool<>((arg) -> new PriorityQueue<>(fieldNamesComparator));
         }
 
         @Override
@@ -121,16 +139,18 @@
                     return MurmurHash3BinaryHash.hash(bytes, offset, length, seed);
                 case ARRAY:
                     try {
-                        return hashArray(type, bytes, offset, length, seed);
+                        return hashArray(type, bytes, offset, length);
                     } catch (IOException e) {
                         throw HyracksDataException.create(e);
                     }
+                case OBJECT:
+                    return hashRecord(type, bytes, offset, length);
                 default:
                     return MurmurHash3BinaryHash.hash(bytes, offset, length, seed);
             }
         }
 
-        private int hashArray(IAType type, byte[] bytes, int offset, int length, int seed) throws IOException {
+        private int hashArray(IAType type, byte[] bytes, int offset, int length) throws IOException {
             if (type == null) {
                 return MurmurHash3BinaryHash.hash(bytes, offset, length, seed);
             }
@@ -153,5 +173,40 @@
 
             return hash;
         }
+
+        private int hashRecord(IAType type, byte[] bytes, int offset, int length) throws HyracksDataException {
+            if (type == null) {
+                return MurmurHash3BinaryHash.hash(bytes, offset, length, seed);
+            }
+            ARecordType recordType = (ARecordType) TypeComputeUtils.getActualTypeOrOpen(type, ATypeTag.OBJECT);
+            ARecordVisitablePointable record = recordAllocator.allocateRecordValue(recordType);
+            PriorityQueue<IVisitablePointable> namesHeap = heapAllocator.allocate(null);
+            try {
+                record.set(bytes, offset, length);
+                namesHeap.clear();
+                List<IVisitablePointable> fieldsNames = record.getFieldNames();
+                List<IVisitablePointable> fieldsValues = record.getFieldValues();
+                CompareHashUtil.addToHeap(fieldsNames, fieldsValues, namesHeap);
+                IVisitablePointable fieldName, fieldValue;
+                IAType fieldType;
+                int hash = 0;
+                int fieldIdx;
+                while (!namesHeap.isEmpty()) {
+                    fieldName = namesHeap.poll();
+                    // TODO(ali): currently doing another lookup to find the target field index and get its value & type
+                    fieldIdx = CompareHashUtil.getIndex(fieldsNames, fieldName);
+                    fieldValue = fieldsValues.get(fieldIdx);
+                    fieldType = CompareHashUtil.getType(recordType, fieldIdx, fieldValue);
+                    hash ^= MurmurHash3BinaryHash.hash(fieldName.getByteArray(), fieldName.getStartOffset(),
+                            fieldName.getLength(), seed)
+                            ^ hash(fieldType, fieldValue.getByteArray(), fieldValue.getStartOffset(),
+                                    fieldValue.getLength());
+                }
+                return hash;
+            } finally {
+                recordAllocator.freeRecord(record);
+                heapAllocator.free(namesHeap);
+            }
+        }
     }
 }