[NO ISSUE][TEST] Add Optimizer Tests
- user model changes: no
- storage format changes: no
- interface changes: no
details:
-added optimizer tests
Change-Id: I4f665bfa59d1b62cb727f5f6f1a0ee0ffa16ee64
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/4065
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_after/interval_after.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_after/interval_after.3.query.sqlpp
new file mode 100644
index 0000000..a33e6dd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_after/interval_after.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff": f.employment, "student" : d.attendance }
+from Staff as f, Students as d
+where `interval-after`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_before/interval_before.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_before/interval_before.3.query.sqlpp
new file mode 100644
index 0000000..e8ebb86
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_before/interval_before.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-before`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_covered_by/interval_covered_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_covered_by/interval_covered_by.3.query.sqlpp
new file mode 100644
index 0000000..854cd59
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_covered_by/interval_covered_by.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-covered-by`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.sqlpp
new file mode 100644
index 0000000..1fa198d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-covers`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_ended_by/interval_ended_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_ended_by/interval_ended_by.3.query.sqlpp
new file mode 100644
index 0000000..1d48700
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_ended_by/interval_ended_by.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-ended-by`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.sqlpp
new file mode 100644
index 0000000..14346f6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-ends`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.sqlpp
new file mode 100644
index 0000000..7bce341
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-meets`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_met_by/interval_met_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_met_by/interval_met_by.3.query.sqlpp
new file mode 100644
index 0000000..19f206d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_met_by/interval_met_by.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-met-by`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlapped_by/interval_overlapped_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlapped_by/interval_overlapped_by.3.query.sqlpp
new file mode 100644
index 0000000..72a1f50
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlapped_by/interval_overlapped_by.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-overlapped-by`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.sqlpp
new file mode 100644
index 0000000..f1c3a68
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-overlapping`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.sqlpp
new file mode 100644
index 0000000..efb224f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-overlaps`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_started_by/interval_started_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_started_by/interval_started_by.3.query.sqlpp
new file mode 100644
index 0000000..410504d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_started_by/interval_started_by.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-started-by`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.sqlpp
new file mode 100644
index 0000000..87ec386
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.sqlpp
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description : Check temporal join functionality for interval
+ * Expected Result : Success
+ * Date : 21th Oct, 2019
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use TinyCollege;
+
+create type StaffType as open {
+ name: string,
+ office: string,
+ employment: interval
+};
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+ name: string,
+ office: string,
+ attendance: interval
+};
+create dataset Students(StudentType)
+primary key name;
+
+select element { "staff" : f.name, "student" : d.name }
+from Staff as f, Students as d
+where `interval-starts`(f.employment, d.attendance);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_after/interval_after.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_after/interval_after.3.query.plan
new file mode 100644
index 0000000..6ac3ccc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_after/interval_after.3.query.plan
@@ -0,0 +1,22 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_before/interval_before.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_before/interval_before.3.query.plan
new file mode 100644
index 0000000..757511d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_before/interval_before.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_covered_by/interval_covered_by.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_covered_by/interval_covered_by.3.query.plan
new file mode 100644
index 0000000..757511d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_covered_by/interval_covered_by.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_covers/interval_covers.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_covers/interval_covers.3.query.plan
new file mode 100644
index 0000000..757511d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_covers/interval_covers.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_ended_by/interval_ended_by.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_ended_by/interval_ended_by.3.query.plan
new file mode 100644
index 0000000..3cd74f9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_ended_by/interval_ended_by.3.query.plan
@@ -0,0 +1,27 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$34][$$35] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$34] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$35] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_ends/interval_ends.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_ends/interval_ends.3.query.plan
new file mode 100644
index 0000000..3cd74f9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_ends/interval_ends.3.query.plan
@@ -0,0 +1,27 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$34][$$35] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$34] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$35] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_meets/interval_meets.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_meets/interval_meets.3.query.plan
new file mode 100644
index 0000000..5c52d52
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_meets/interval_meets.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$30][$$31] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$30] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$31] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_met_by/interval_met_by.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_met_by/interval_met_by.3.query.plan
new file mode 100644
index 0000000..5c52d52
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_met_by/interval_met_by.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$30][$$31] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$30] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$31] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlapped_by/interval_overlapped_by.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlapped_by/interval_overlapped_by.3.query.plan
new file mode 100644
index 0000000..757511d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlapped_by/interval_overlapped_by.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.plan
new file mode 100644
index 0000000..757511d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.plan
new file mode 100644
index 0000000..757511d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.plan
@@ -0,0 +1,21 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- NESTED_LOOP |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- BROADCAST_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_started_by/interval_started_by.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_started_by/interval_started_by.3.query.plan
new file mode 100644
index 0000000..8a2f9ecf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_started_by/interval_started_by.3.query.plan
@@ -0,0 +1,27 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$32][$$33] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$33] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_starts/interval_starts.3.query.plan b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_starts/interval_starts.3.query.plan
new file mode 100644
index 0000000..8a2f9ecf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results/temporal/interval_joins/interval_starts/interval_starts.3.query.plan
@@ -0,0 +1,27 @@
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- STREAM_SELECT |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- HYBRID_HASH_JOIN [$$32][$$33] |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
+ -- HASH_PARTITION_EXCHANGE [$$33] |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- STREAM_PROJECT |PARTITIONED|
+ -- ASSIGN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- DATASOURCE_SCAN |PARTITIONED|
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|