diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/IntervalMergeJoinPOperator.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/IntervalMergeJoinPOperator.java
index 4815349..2b96176 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/IntervalMergeJoinPOperator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/algebra/operators/physical/IntervalMergeJoinPOperator.java
@@ -171,14 +171,14 @@
     public void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context, ILogicalOperator op,
             IOperatorSchema opSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema)
             throws AlgebricksException {
-        int[] keysLeft = JobGenHelper.variablesToFieldIndexes(keysLeftBranch, inputSchemas[0]);
-        int[] keysRight = JobGenHelper.variablesToFieldIndexes(keysRightBranch, inputSchemas[1]);
+        int[] keysBuild = JobGenHelper.variablesToFieldIndexes(keysLeftBranch, inputSchemas[0]);
+        int[] keysProbe = JobGenHelper.variablesToFieldIndexes(keysRightBranch, inputSchemas[1]);
 
         IOperatorDescriptorRegistry spec = builder.getJobSpec();
         RecordDescriptor recordDescriptor =
                 JobGenHelper.mkRecordDescriptor(context.getTypeEnvironment(op), opSchema, context);
 
-        IOperatorDescriptor opDesc = getIntervalOperatorDescriptor(keysLeft, keysRight, spec, recordDescriptor, mjcf);
+        IOperatorDescriptor opDesc = getIntervalOperatorDescriptor(keysBuild, keysProbe, spec, recordDescriptor, mjcf);
         contributeOpDesc(builder, (AbstractLogicalOperator) op, opDesc);
 
         ILogicalOperator src1 = op.getInputs().get(0).getValue();
@@ -187,9 +187,9 @@
         builder.contributeGraphEdge(src2, 0, op, 1);
     }
 
-    IOperatorDescriptor getIntervalOperatorDescriptor(int[] keysLeft, int[] keysRight, IOperatorDescriptorRegistry spec,
-            RecordDescriptor recordDescriptor, IIntervalJoinUtilFactory mjcf) {
-        return new IntervalMergeJoinOperatorDescriptor(spec, memSizeInFrames, keysLeft, keysRight, recordDescriptor,
+    IOperatorDescriptor getIntervalOperatorDescriptor(int[] keysBuild, int[] keysProbe,
+            IOperatorDescriptorRegistry spec, RecordDescriptor recordDescriptor, IIntervalJoinUtilFactory mjcf) {
+        return new IntervalMergeJoinOperatorDescriptor(spec, memSizeInFrames, keysBuild, keysProbe, recordDescriptor,
                 mjcf);
     }
 }
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/util/AsterixJoinUtils.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/util/AsterixJoinUtils.java
index 45b8b07..3a07e10 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/util/AsterixJoinUtils.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/util/AsterixJoinUtils.java
@@ -72,8 +72,10 @@
         if (rangeMap.getTag(0, 0) != ATypeTag.DATETIME.serialize() && rangeMap.getTag(0, 0) != ATypeTag.DATE.serialize()
                 && rangeMap.getTag(0, 0) != ATypeTag.TIME.serialize()) {
             IWarningCollector warningCollector = context.getWarningCollector();
-            warningCollector.warn(Warning.forHyracks(op.getSourceLocation(), ErrorCode.INAPPLICABLE_HINT,
-                    "Date, DateTime, and Time are only range hints types supported for interval joins"));
+            if (warningCollector.shouldWarn()) {
+                warningCollector.warn(Warning.forHyracks(op.getSourceLocation(), ErrorCode.INAPPLICABLE_HINT,
+                        "Date, DateTime, and Time are only range hints types supported for interval joins"));
+            }
             return;
         }
         IntervalPartitions intervalPartitions =
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/TemporalQueries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/TemporalQueries.xml
index 2df6acb..4ec2303 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/TemporalQueries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/TemporalQueries.xml
@@ -155,8 +155,8 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="temporal/interval_joins">
-      <compilation-unit name="interval_overlapping">
-        <output-dir compare="Text">interval_overlapping</output-dir>
+      <compilation-unit name="interval_after">
+        <output-dir compare="Text">interval_after</output-dir>
       </compilation-unit>
     </test-case>
     <test-case FilePath="temporal/interval_joins">
@@ -165,11 +165,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="temporal/interval_joins">
+      <compilation-unit name="interval_covered_by">
+        <output-dir compare="Text">interval_covered_by</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins">
       <compilation-unit name="interval_covers">
         <output-dir compare="Text">interval_covers</output-dir>
       </compilation-unit>
     </test-case>
     <test-case FilePath="temporal/interval_joins">
+      <compilation-unit name="interval_ended_by">
+        <output-dir compare="Text">interval_ended_by</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins">
       <compilation-unit name="interval_ends">
         <output-dir compare="Text">interval_ends</output-dir>
       </compilation-unit>
@@ -180,31 +190,6 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="temporal/interval_joins">
-      <compilation-unit name="interval_overlaps">
-        <output-dir compare="Text">interval_overlaps</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal/interval_joins">
-      <compilation-unit name="interval_starts">
-        <output-dir compare="Text">interval_starts</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal/interval_joins">
-      <compilation-unit name="interval_after">
-        <output-dir compare="Text">interval_after</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal/interval_joins">
-      <compilation-unit name="interval_covered_by">
-        <output-dir compare="Text">interval_covered_by</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal/interval_joins">
-      <compilation-unit name="interval_ended_by">
-        <output-dir compare="Text">interval_ended_by</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal/interval_joins">
       <compilation-unit name="interval_met_by">
         <output-dir compare="Text">interval_met_by</output-dir>
       </compilation-unit>
@@ -215,8 +200,58 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="temporal/interval_joins">
+      <compilation-unit name="interval_overlapping">
+        <output-dir compare="Text">interval_overlapping</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins">
+      <compilation-unit name="interval_overlaps">
+        <output-dir compare="Text">interval_overlaps</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins">
       <compilation-unit name="interval_started_by">
         <output-dir compare="Text">interval_started_by</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="temporal/interval_joins">
+      <compilation-unit name="interval_starts">
+        <output-dir compare="Text">interval_starts</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_after">
+        <output-dir compare="Text">interval_after</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_before">
+        <output-dir compare="Text">interval_before</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_covered_by">
+        <output-dir compare="Text">interval_covered_by</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_covers">
+        <output-dir compare="Text">interval_covers</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_overlapped_by">
+        <output-dir compare="Text">interval_overlapped_by</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_overlapping">
+        <output-dir compare="Text">interval_overlapping</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="temporal/interval_joins_spilling">
+      <compilation-unit name="interval_overlaps">
+        <output-dir compare="Text">interval_overlaps</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.1.ddl.sqlpp
new file mode 100644
index 0000000..7ae3a6c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   10th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.2.update.sqlpp
new file mode 100644
index 0000000..3b79eb5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.2.update.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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 spilling functionality for interval after
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 2,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 2,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.3.query.sqlpp
new file mode 100644
index 0000000..4bd3a38
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_after/interval_after.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval after
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_after(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.1.ddl.sqlpp
new file mode 100644
index 0000000..928f3b1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval before
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.2.update.sqlpp
new file mode 100644
index 0000000..68fc545
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.2.update.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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 spilling functionality for interval before
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 2,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 2,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.3.query.sqlpp
new file mode 100644
index 0000000..b363137
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_before/interval_before.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval before
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_before(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.1.ddl.sqlpp
new file mode 100644
index 0000000..6e0fb3d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval covered_by
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.2.update.sqlpp
new file mode 100644
index 0000000..750e5e0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.2.update.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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 spilling functionality for interval covered_by
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 2,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 20,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.3.query.sqlpp
new file mode 100644
index 0000000..66d2747
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval covered_by
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_covered_by(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.1.ddl.sqlpp
new file mode 100644
index 0000000..1561f8a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval covers
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.2.update.sqlpp
new file mode 100644
index 0000000..2ac8eda
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.2.update.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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 spilling functionality for interval covers
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 20,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 2,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.3.query.sqlpp
new file mode 100644
index 0000000..a7bbc96
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_covers/interval_covers.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval covers
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_covers(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.1.ddl.sqlpp
new file mode 100644
index 0000000..67561d6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval overlapped_by
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.2.update.sqlpp
new file mode 100644
index 0000000..a4f25c3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.2.update.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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 spilling functionality for interval overlapped_by
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 20,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 20,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.3.query.sqlpp
new file mode 100644
index 0000000..93c810a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval overlapped_by
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_overlapped_by(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.1.ddl.sqlpp
new file mode 100644
index 0000000..e55fad7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval overlapping
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.2.update.sqlpp
new file mode 100644
index 0000000..b0c6139
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.2.update.sqlpp
@@ -0,0 +1,49 @@
+/*
+ * 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 spilling functionality for interval overlapping
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 10,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 10,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.3.query.sqlpp
new file mode 100644
index 0000000..243b4ec
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.3.query.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval overlapping
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_overlapping(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.1.ddl.sqlpp
new file mode 100644
index 0000000..ab7c0cd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join spilling functionality for interval overlaps
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+drop dataverse IntervalTest if exists;
+create dataverse IntervalTest;
+use IntervalTest;
+
+create type IntervalType as open {
+id: int64,
+interval: interval,
+filler: string
+};
+
+create dataset DataSet1(IntervalType) primary key id;
+create dataset DataSet2(IntervalType) primary key id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.2.update.sqlpp
new file mode 100644
index 0000000..de06fde
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.2.update.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 spilling functionality for interval overlaps
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+use IntervalTest;
+
+insert into DataSet1
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 20,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
+
+insert into DataSet2
+from range(1, 100) s at srow,
+     range(1, 1) l at lrow
+let filler = repeat("i", 10000),
+    lambda = 1, d = 20,
+    id = (srow-1) * lambda + lrow
+select value {
+"id": id,
+"interval": interval(datetime_from_unix_time_in_secs(s), datetime_from_unix_time_in_secs(s + d)),
+"filler": filler
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.3.query.sqlpp
new file mode 100644
index 0000000..becc9e7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.3.query.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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 spilling functionality for interval overlaps
+ * Expected Result  :   Success
+ * Date             :   13th Aug, 2020
+ */
+
+use IntervalTest;
+
+select count(*)
+from (select element { "id1" : ds1.id, "id2" : ds2.id, "spill" : length(ds1.filler || ds2.filler)}
+    from DataSet1 as ds1, DataSet2 as ds2
+    where
+    /*+ range [datetime("1970-01-01T00:00:05.000Z"), datetime("1970-01-01T00:00:10.000Z"), datetime("1970-01-01T00:00:15.000Z")] */
+    interval_overlaps(ds1.interval, ds2.interval)) as results0
+where results0.id1 > 1 or results0.filler = 1;
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_after/interval_after.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_after/interval_after.3.adm
new file mode 100644
index 0000000..393d858
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_after/interval_after.3.adm
@@ -0,0 +1 @@
+{ "$1": 4753 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_before/interval_before.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_before/interval_before.3.adm
new file mode 100644
index 0000000..c114617
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_before/interval_before.3.adm
@@ -0,0 +1 @@
+{ "$1": 4656 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.3.adm
new file mode 100644
index 0000000..b3d2794
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_covered_by/interval_covered_by.3.adm
@@ -0,0 +1 @@
+{ "$1": 1728 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_covers/interval_covers.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_covers/interval_covers.3.adm
new file mode 100644
index 0000000..81026fe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_covers/interval_covers.3.adm
@@ -0,0 +1 @@
+{ "$1": 1710 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.3.adm
new file mode 100644
index 0000000..81026fe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlapped_by/interval_overlapped_by.3.adm
@@ -0,0 +1 @@
+{ "$1": 1710 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.3.adm
new file mode 100644
index 0000000..5e118ee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlapping/interval_overlapping.3.adm
@@ -0,0 +1 @@
+{ "$1": 1800 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.3.adm
new file mode 100644
index 0000000..2dfe912
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins_spilling/interval_overlaps/interval_overlaps.3.adm
@@ -0,0 +1 @@
+{ "$1": 1691 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoinOperatorDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoinOperatorDescriptor.java
index f28faf1..0417ee0 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoinOperatorDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoinOperatorDescriptor.java
@@ -46,22 +46,17 @@
 
     private static final int JOIN_BUILD_ACTIVITY_ID = 0;
     private static final int JOIN_PROBE_ACTIVITY_ID = 1;
-    private final int[] leftKeys;
-    private final int[] rightKeys;
+    private final int buildKey;
+    private final int probeKey;
     private final int memoryForJoin;
     private final IIntervalJoinUtilFactory imjcf;
 
-    private final int probeKey;
-    private final int buildKey;
-
-    public IntervalMergeJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int memoryForJoin, int[] leftKeys,
-            int[] rightKeys, RecordDescriptor recordDescriptor, IIntervalJoinUtilFactory imjcf) {
+    public IntervalMergeJoinOperatorDescriptor(IOperatorDescriptorRegistry spec, int memoryForJoin, int[] buildKey,
+            int[] probeKeys, RecordDescriptor recordDescriptor, IIntervalJoinUtilFactory imjcf) {
         super(spec, 2, 1);
         outRecDescs[0] = recordDescriptor;
-        this.buildKey = leftKeys[0];
-        this.probeKey = rightKeys[0];
-        this.leftKeys = leftKeys;
-        this.rightKeys = rightKeys;
+        this.buildKey = buildKey[0];
+        this.probeKey = probeKeys[0];
         this.memoryForJoin = memoryForJoin;
         this.imjcf = imjcf;
     }
@@ -115,8 +110,7 @@
                     state = new JoinCacheTaskState(ctx.getJobletContext().getJobId(),
                             new TaskId(getActivityId(), partition));
 
-                    IIntervalJoinUtil imjc =
-                            imjcf.createIntervalMergeJoinChecker(leftKeys, rightKeys, ctx, nPartitions);
+                    IIntervalJoinUtil imjc = imjcf.createIntervalMergeJoinUtil(buildKey, probeKey, ctx, nPartitions);
 
                     state.joiner = new IntervalMergeJoiner(ctx, memoryForJoin, imjc, buildKey, probeKey, rd0, rd1);
                 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoiner.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoiner.java
index 13d8c25..d1d2310 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoiner.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/IntervalMergeJoiner.java
@@ -86,17 +86,14 @@
     protected final FrameTupleAppender resultAppender;
     protected final ITupleAccessor[] inputAccessor;
 
-    protected long[] frameCounts = { 0, 0 };
-    protected long[] tupleCounts = { 0, 0 };
-
     public IntervalMergeJoiner(IHyracksTaskContext ctx, int memorySize, IIntervalJoinUtil mjc, int buildKeys,
             int probeKeys, RecordDescriptor buildRd, RecordDescriptor probeRd) throws HyracksDataException {
         this.mjc = mjc;
 
         // Memory (probe buffer)
-        if (memorySize < 1) {
+        if (memorySize < 5) {
             throw new HyracksDataException(
-                    "MergeJoiner does not have enough memory (needs > 0, got " + memorySize + ").");
+                    "MergeJoiner does not have enough memory (needs > 4, got " + memorySize + ").");
         }
 
         inputAccessor = new TupleAccessor[JOIN_PARTITIONS];
@@ -107,7 +104,8 @@
         inputBuffer[BUILD_PARTITION] = new VSizeFrame(ctx);
         inputBuffer[PROBE_PARTITION] = new VSizeFrame(ctx);
 
-        framePool = new DeallocatableFramePool(ctx, (memorySize) * ctx.getInitialFrameSize());
+        //Two frames are used for the runfile stream, and one frame for each input (2 outputs).
+        framePool = new DeallocatableFramePool(ctx, (memorySize - 4) * ctx.getInitialFrameSize());
         bufferManager = new IntervalVariableDeletableTupleMemoryManager(framePool, probeRd);
         memoryAccessor = ((IntervalVariableDeletableTupleMemoryManager) bufferManager).createTupleAccessor();
 
@@ -145,8 +143,10 @@
 
         TupleStatus buildTs = loadBuildTuple();
         TupleStatus probeTs = loadProbeTuple();
-        while (buildTs.isLoaded() && (probeTs.isLoaded() || memoryHasTuples())) {
-            if (probeTs.isLoaded()) {
+        while (buildTs.isLoaded() && probeTs.isLoaded()) {
+            if (probeTs.isLoaded() && mjc.checkToLoadNextProbeTuple(inputAccessor[BUILD_PARTITION],
+                    inputAccessor[BUILD_PARTITION].getTupleId(), inputAccessor[PROBE_PARTITION],
+                    inputAccessor[PROBE_PARTITION].getTupleId())) {
                 // Right side from stream
                 processProbeTuple(writer);
                 probeTs = loadProbeTuple();
@@ -159,6 +159,14 @@
     }
 
     public void processProbeClose(IFrameWriter writer) throws HyracksDataException {
+
+        TupleStatus buildTs = loadBuildTuple();
+        while (buildTs.isLoaded() && memoryHasTuples()) {
+            // Left side from stream
+            processBuildTuple(writer);
+            buildTs = loadBuildTuple();
+        }
+
         resultAppender.write(writer, true);
         runFileStream.close();
         runFileStream.removeRunFile();
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalInverseJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalInverseJoinUtil.java
index 7830b0c..b45dd98 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalInverseJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalInverseJoinUtil.java
@@ -23,30 +23,38 @@
 
 public abstract class AbstractIntervalInverseJoinUtil extends AbstractIntervalJoinUtil {
 
-    public AbstractIntervalInverseJoinUtil(int idLeft, int idRight) {
-        super(idLeft, idRight);
+    public AbstractIntervalInverseJoinUtil(int idBuild, int idProbe) {
+        super(idBuild, idProbe);
     }
 
     /**
      * Right (second argument) interval starts before left (first argument) interval ends.
      */
     @Override
-    public boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long end1 = IntervalJoinUtil.getIntervalEnd(accessorRight, rightTupleIndex, idRight);
-        return start0 < end1;
+    public boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeEnd = IntervalJoinUtil.getIntervalEnd(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart < probeEnd;
     }
 
     /**
      * Left (first argument) interval starts after the Right (second argument) interval ends.
      */
     @Override
-    public boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long end1 = IntervalJoinUtil.getIntervalEnd(accessorRight, rightTupleIndex, idRight);
-        return start0 >= end1;
+    public boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeEnd = IntervalJoinUtil.getIntervalEnd(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart >= probeEnd;
+    }
+
+    @Override
+    public boolean checkToLoadNextProbeTuple(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart >= probeStart;
     }
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalJoinUtil.java
index da50ab2..80d791c 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AbstractIntervalJoinUtil.java
@@ -18,98 +18,76 @@
  */
 package org.apache.asterix.runtime.operators.joins.interval.utils;
 
-import org.apache.asterix.formats.nontagged.BinaryComparatorFactoryProvider;
 import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable;
-import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.runtime.evaluators.functions.temporal.IntervalLogic;
 import org.apache.asterix.runtime.operators.joins.interval.utils.memory.IntervalJoinUtil;
 import org.apache.hyracks.api.comm.IFrameTupleAccessor;
-import org.apache.hyracks.api.dataflow.value.IBinaryComparator;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.TaggedValuePointable;
-import org.apache.hyracks.data.std.primitive.VoidPointable;
 
 public abstract class AbstractIntervalJoinUtil implements IIntervalJoinUtil {
 
-    protected final int idLeft;
-    protected final int idRight;
+    protected final int idBuild;
+    protected final int idProbe;
 
     protected final IntervalLogic il = new IntervalLogic();
+    protected final AIntervalPointable ipBuild = (AIntervalPointable) AIntervalPointable.FACTORY.createPointable();
+    protected final AIntervalPointable ipProbe = (AIntervalPointable) AIntervalPointable.FACTORY.createPointable();
 
-    protected final TaggedValuePointable tvp = TaggedValuePointable.FACTORY.createPointable();
-    protected final AIntervalPointable ipLeft = (AIntervalPointable) AIntervalPointable.FACTORY.createPointable();
-    protected final AIntervalPointable ipRight = (AIntervalPointable) AIntervalPointable.FACTORY.createPointable();
-
-    protected final IBinaryComparator ch = BinaryComparatorFactoryProvider.INSTANCE
-            .getBinaryComparatorFactory(BuiltinType.ANY, BuiltinType.ANY, true).createBinaryComparator();
-    protected final IPointable startLeft = VoidPointable.FACTORY.createPointable();
-    protected final IPointable startRight = VoidPointable.FACTORY.createPointable();
-
-    public AbstractIntervalJoinUtil(int idLeft, int idRight) {
-        this.idLeft = idLeft;
-        this.idRight = idRight;
+    public AbstractIntervalJoinUtil(int idBuild, int idProbe) {
+        this.idBuild = idBuild;
+        this.idProbe = idProbe;
     }
 
     /**
      * Right (second argument) interval starts before left (first argument) interval ends.
      */
     @Override
-    public boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleIndex, idRight);
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        return start0 <= start1;
+    public boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart <= probeStart;
     }
 
     /**
      * Left (first argument) interval starts after the Right (second argument) interval ends.
      */
     @Override
-    public boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleIndex, idRight);
-        return start0 > start1;
-    }
-
-    /**
-     * Left (first argument) interval starts after the Right (second argument) interval ends.
-     */
-    @Override
-    public boolean checkIfMoreMatches(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleIndex, idRight);
-        long end0 = IntervalJoinUtil.getIntervalEnd(accessorLeft, leftTupleIndex, idLeft);
-        return end0 > start1;
+    public boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart > probeStart;
     }
 
     @Override
-    public boolean checkToSaveInResult(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex, boolean reversed) throws HyracksDataException {
-        if (reversed) {
-            IntervalJoinUtil.getIntervalPointable(accessorLeft, leftTupleIndex, idLeft, ipRight);
-            IntervalJoinUtil.getIntervalPointable(accessorRight, rightTupleIndex, idRight, ipLeft);
-        } else {
-            IntervalJoinUtil.getIntervalPointable(accessorLeft, leftTupleIndex, idLeft, ipLeft);
-            IntervalJoinUtil.getIntervalPointable(accessorRight, rightTupleIndex, idRight, ipRight);
-        }
-        return compareInterval(ipLeft, ipRight);
+    public boolean checkToSaveInResult(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) throws HyracksDataException {
+        IntervalJoinUtil.getIntervalPointable(buildAccessor, buildTupleIndex, idBuild, ipBuild);
+        IntervalJoinUtil.getIntervalPointable(probeAccessor, probeTupleIndex, idProbe, ipProbe);
+        return compareInterval(ipBuild, ipProbe);
     }
 
     /**
      * Right (second argument) interval starts before left (first argument) interval ends.
      */
     @Override
-    public boolean checkForEarlyExit(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleIndex, idRight);
-        long end0 = IntervalJoinUtil.getIntervalEnd(accessorLeft, leftTupleIndex, idLeft);
-        return end0 < start1;
+    public boolean checkForEarlyExit(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildEnd = IntervalJoinUtil.getIntervalEnd(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return buildEnd < probeStart;
     }
 
     @Override
-    public abstract boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight)
+    public abstract boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe)
             throws HyracksDataException;
 
+    @Override
+    public boolean checkToLoadNextProbeTuple(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildEnd = IntervalJoinUtil.getIntervalEnd(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return buildEnd > probeStart;
+    }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtil.java
index e192943..5dd4c44 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtil.java
@@ -25,38 +25,38 @@
 
 public class AfterIntervalJoinUtil extends AbstractIntervalJoinUtil {
 
-    public AfterIntervalJoinUtil(int[] keysLeft, int[] keysRight) {
-        super(keysLeft[0], keysRight[0]);
+    public AfterIntervalJoinUtil(int buildKey, int probeKey) {
+        super(buildKey, probeKey);
     }
 
     @Override
-    public boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleID,
-            IFrameTupleAccessor accessorRight, int rightTupleID) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleID, idRight);
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleID, idRight);
-        return start0 >= start1;
-    }
-
-    @Override
-    public boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        return false;
-    }
-
-    @Override
-    public boolean checkForEarlyExit(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        return false;
-    }
-
-    @Override
-    public boolean checkIfMoreMatches(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
+    public boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
         return true;
     }
 
     @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.after(ipLeft, ipRight);
+    public boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        return false;
+    }
+
+    @Override
+    public boolean checkForEarlyExit(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        return false;
+    }
+
+    @Override
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.after(ipBuild, ipProbe);
+    }
+
+    @Override
+    public boolean checkToLoadNextProbeTuple(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildEnd = IntervalJoinUtil.getIntervalEnd(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return probeStart <= buildEnd;
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtilFactory.java
index b54edf8..9fe4e9d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/AfterIntervalJoinUtilFactory.java
@@ -24,8 +24,8 @@
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) {
-        return new AfterIntervalJoinUtil(keys0, keys1);
+        return new AfterIntervalJoinUtil(buildKey, probeKey);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtil.java
index 304775c..5212a4d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtil.java
@@ -25,38 +25,38 @@
 
 public class BeforeIntervalJoinUtil extends AbstractIntervalJoinUtil {
 
-    public BeforeIntervalJoinUtil(int[] keysLeft, int[] keysRight) {
-        super(keysLeft[0], keysRight[0]);
+    public BeforeIntervalJoinUtil(int buildKey, int probeKey) {
+        super(buildKey, probeKey);
     }
 
     @Override
-    public boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleID,
-            IFrameTupleAccessor accessorRight, int rightTupleID) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleID, idRight);
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleID, idRight);
-        return start0 <= start1;
+    public boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart < probeStart;
     }
 
     @Override
-    public boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
+    public boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        return !checkToSaveInMemory(buildAccessor, buildTupleIndex, probeAccessor, probeTupleIndex);
+    }
+
+    @Override
+    public boolean checkForEarlyExit(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
         return false;
     }
 
     @Override
-    public boolean checkForEarlyExit(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        return false;
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.before(ipBuild, ipProbe);
     }
 
     @Override
-    public boolean checkIfMoreMatches(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
+    public boolean checkToLoadNextProbeTuple(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
         return true;
     }
-
-    @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.before(ipLeft, ipRight);
-    }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtilFactory.java
index a653ff9..1984caf 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/BeforeIntervalJoinUtilFactory.java
@@ -24,8 +24,8 @@
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) {
-        return new BeforeIntervalJoinUtil(keys0, keys1);
+        return new BeforeIntervalJoinUtil(buildKey, probeKey);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtil.java
index a8e8177..91dfc66 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtil.java
@@ -25,35 +25,35 @@
 
 public class CoveredByIntervalJoinUtil extends AbstractIntervalInverseJoinUtil {
 
-    public CoveredByIntervalJoinUtil(int[] keysLeft, int[] keysRight) {
-        super(keysLeft[0], keysRight[0]);
+    public CoveredByIntervalJoinUtil(int buildKey, int probeKey) {
+        super(buildKey, probeKey);
     }
 
     /**
      * Right (second argument) interval starts before left (first argument) interval ends.
      */
     @Override
-    public boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long end1 = IntervalJoinUtil.getIntervalEnd(accessorRight, rightTupleIndex, idRight);
-        return start0 <= end1;
+    public boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeEnd = IntervalJoinUtil.getIntervalEnd(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart <= probeEnd;
     }
 
     /**
      * Left (first argument) interval starts after the Right (second argument) interval ends.
      */
     @Override
-    public boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long end1 = IntervalJoinUtil.getIntervalEnd(accessorRight, rightTupleIndex, idRight);
-        return start0 > end1;
+    public boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeEnd = IntervalJoinUtil.getIntervalEnd(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart > probeEnd;
 
     }
 
     @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.coveredBy(ipLeft, ipRight);
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.coveredBy(ipBuild, ipProbe);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtilFactory.java
index 7f52c11..4b21ae8 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoveredByIntervalJoinUtilFactory.java
@@ -24,8 +24,8 @@
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) {
-        return new CoveredByIntervalJoinUtil(keys0, keys1);
+        return new CoveredByIntervalJoinUtil(buildKey, probeKey);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtil.java
index cdfaafd..41c8c34 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtil.java
@@ -23,12 +23,12 @@
 
 public class CoversIntervalJoinUtil extends AbstractIntervalJoinUtil {
 
-    public CoversIntervalJoinUtil(int[] keysLeft, int[] keysRight) {
-        super(keysLeft[0], keysRight[0]);
+    public CoversIntervalJoinUtil(int buildKey, int probeKey) {
+        super(buildKey, probeKey);
     }
 
     @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.covers(ipLeft, ipRight);
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.covers(ipBuild, ipProbe);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtilFactory.java
index 9b7481e..862aebe 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/CoversIntervalJoinUtilFactory.java
@@ -24,8 +24,8 @@
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) {
-        return new CoversIntervalJoinUtil(keys0, keys1);
+        return new CoversIntervalJoinUtil(buildKey, probeKey);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtil.java
index 91c14b0..79eb2d7 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtil.java
@@ -29,74 +29,74 @@
      * The memory is used to check the right tuple with the remaining left tuples.
      * The check is true if the next left tuple could still match with this right tuple.
      *
-     * @param accessorLeft
-     * @param accessorRight
+     * @param buildAccessor
+     * @param probeAccessor
      * @return boolean
      * @throws HyracksDataException
      */
-    boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex, IFrameTupleAccessor accessorRight,
-            int rightTupleIndex) throws HyracksDataException;
+    boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex);
 
     /**
      * Check to see if the right tuple should be removed from memory during the merge join.
      * The memory is used to check the right tuple with the remaining left tuples.
      * The check is true if the next left tuple is NOT able match with this right tuple.
      *
-     * @param accessorLeft
-     * @param accessorRight
+     * @param buildAccessor
+     * @param probeAccessor
      * @return boolean
      * @throws HyracksDataException
      */
-    boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) throws HyracksDataException;
-
-    /**
-     * Check to see if the left tuple should continue checking for matches.
-     * The check is true if the next left tuple is NOT able match with this right tuple.
-     *
-     * @param accessorLeft
-     * @param accessorRight
-     * @return boolean
-     * @throws HyracksDataException
-     */
-    boolean checkIfMoreMatches(IFrameTupleAccessor accessorLeft, int leftTupleIndex, IFrameTupleAccessor accessorRight,
-            int rightTupleIndex) throws HyracksDataException;
+    boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex);
 
     /**
      * Check to see if tuples match join condition
      * The check is true if they match.
      *
-     * @param accessorLeft
-     * @param leftTupleIndex
-     * @param accessorRight
-     * @param rightTupleIndex
+     * @param buildAccessor
+     * @param buildTupleIndex
+     * @param probeAccessor
+     * @param probeTupleIndex
      * @return boolean
      * @throws HyracksDataException
      */
-    boolean checkToSaveInResult(IFrameTupleAccessor accessorLeft, int leftTupleIndex, IFrameTupleAccessor accessorRight,
-            int rightTupleIndex, boolean reversed) throws HyracksDataException;
+    boolean checkToSaveInResult(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) throws HyracksDataException;
 
     /**
      * Check to see if the interval matches the join condition.
      * The check is true if it matches.
      *
-     * @param ipLeft
-     * @param ipRight
+     * @param ipBuild
+     * @param ipProbe
      * @return boolean
      * @throws HyracksDataException
      */
-    boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException;
+    boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException;
 
     /**
      * Check to see if the left tuple should stop checking for matches.
      * The check is true if there can be no more matches
      *
-     * @param accessorLeft
-     * @param accessorRight
+     * @param buildAccessor
+     * @param probeAccessor
      * @return boolean
      * @throws HyracksDataException
      */
-    boolean checkForEarlyExit(IFrameTupleAccessor accessorLeft, int leftTupleIndex, IFrameTupleAccessor accessorRight,
-            int rightTupleIndex) throws HyracksDataException;
+    boolean checkForEarlyExit(IFrameTupleAccessor buildAccessor, int buildTupleIndex, IFrameTupleAccessor probeAccessor,
+            int probeTupleIndex);
+
+    /**
+     * Check if next tuple should be loaded into memory.
+     * The check is true if there are more tuples
+     *
+     * @param buildAccessor
+     * @param probeAccessor
+     * @return boolean
+     * @throws HyracksDataException
+     */
+    boolean checkToLoadNextProbeTuple(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex);
 
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtilFactory.java
index b5f0bba..e9c2957 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/IIntervalJoinUtilFactory.java
@@ -25,6 +25,6 @@
 
 public interface IIntervalJoinUtilFactory extends Serializable {
 
-    IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx, int nPartitions)
+    IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx, int nPartitions)
             throws HyracksDataException;
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtil.java
index e2e79f9..2bd03a2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtil.java
@@ -23,12 +23,12 @@
 
 public class OverlappedByIntervalJoinUtil extends AbstractIntervalInverseJoinUtil {
 
-    public OverlappedByIntervalJoinUtil(int[] keysLeft, int[] keysRight) {
-        super(keysLeft[0], keysRight[0]);
+    public OverlappedByIntervalJoinUtil(int buildKey, int probeKey) {
+        super(buildKey, probeKey);
     }
 
     @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.overlappedBy(ipLeft, ipRight);
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.overlappedBy(ipBuild, ipProbe);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtilFactory.java
index 74de359..d54982a 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappedByIntervalJoinUtilFactory.java
@@ -24,8 +24,8 @@
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) {
-        return new OverlappedByIntervalJoinUtil(keys0, keys1);
+        return new OverlappedByIntervalJoinUtil(buildKey, probeKey);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtil.java
index 10a182c..9aeb09b 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtil.java
@@ -26,8 +26,8 @@
 public class OverlappingIntervalJoinUtil extends AbstractIntervalJoinUtil {
     private final long partitionStart;
 
-    public OverlappingIntervalJoinUtil(int[] keysLeft, int[] keysRight, long partitionStart) {
-        super(keysLeft[0], keysRight[0]);
+    public OverlappingIntervalJoinUtil(int buildKey, int probeKey, long partitionStart) {
+        super(buildKey, probeKey);
         this.partitionStart = partitionStart;
     }
 
@@ -35,54 +35,49 @@
      * Right (second argument) interval starts before left (first argument) interval ends.
      */
     @Override
-    public boolean checkToSaveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long end1 = IntervalJoinUtil.getIntervalEnd(accessorRight, rightTupleIndex, idRight);
-        return start0 < end1;
+    public boolean checkToSaveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeEnd = IntervalJoinUtil.getIntervalEnd(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart < probeEnd;
     }
 
     /**
      * Right (second argument) interval starts before left (first argument) interval ends.
      */
     @Override
-    public boolean checkForEarlyExit(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start1 = IntervalJoinUtil.getIntervalStart(accessorRight, rightTupleIndex, idRight);
-        long end0 = IntervalJoinUtil.getIntervalEnd(accessorLeft, leftTupleIndex, idLeft);
-        return end0 <= start1;
+    public boolean checkForEarlyExit(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long probeStart = IntervalJoinUtil.getIntervalStart(probeAccessor, probeTupleIndex, idProbe);
+        long buildEnd = IntervalJoinUtil.getIntervalEnd(buildAccessor, buildTupleIndex, idBuild);
+        return buildEnd <= probeStart;
     }
 
     /**
      * Left (first argument) interval starts after the Right (second argument) interval ends.
      */
     @Override
-    public boolean checkToRemoveInMemory(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex) {
-        long start0 = IntervalJoinUtil.getIntervalStart(accessorLeft, leftTupleIndex, idLeft);
-        long end1 = IntervalJoinUtil.getIntervalEnd(accessorRight, rightTupleIndex, idRight);
-        return start0 >= end1;
+    public boolean checkToRemoveInMemory(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) {
+        long buildStart = IntervalJoinUtil.getIntervalStart(buildAccessor, buildTupleIndex, idBuild);
+        long probeEnd = IntervalJoinUtil.getIntervalEnd(probeAccessor, probeTupleIndex, idProbe);
+        return buildStart >= probeEnd;
     }
 
     @Override
-    public boolean checkToSaveInResult(IFrameTupleAccessor accessorLeft, int leftTupleIndex,
-            IFrameTupleAccessor accessorRight, int rightTupleIndex, boolean reversed) throws HyracksDataException {
-        if (reversed) {
-            IntervalJoinUtil.getIntervalPointable(accessorLeft, leftTupleIndex, idLeft, ipRight);
-            IntervalJoinUtil.getIntervalPointable(accessorRight, rightTupleIndex, idRight, ipLeft);
-        } else {
-            IntervalJoinUtil.getIntervalPointable(accessorLeft, leftTupleIndex, idLeft, ipLeft);
-            IntervalJoinUtil.getIntervalPointable(accessorRight, rightTupleIndex, idRight, ipRight);
-        }
-        if (ipLeft.getStartValue() < partitionStart && ipRight.getStartValue() < partitionStart) {
+    public boolean checkToSaveInResult(IFrameTupleAccessor buildAccessor, int buildTupleIndex,
+            IFrameTupleAccessor probeAccessor, int probeTupleIndex) throws HyracksDataException {
+        IntervalJoinUtil.getIntervalPointable(buildAccessor, buildTupleIndex, idBuild, ipBuild);
+        IntervalJoinUtil.getIntervalPointable(probeAccessor, probeTupleIndex, idProbe, ipProbe);
+        if (ipBuild.getStartValue() < partitionStart && ipProbe.getStartValue() < partitionStart) {
             // These tuples match in a different partition
             return false;
         }
-        return compareInterval(ipLeft, ipRight);
+        return compareInterval(ipBuild, ipProbe);
     }
 
     @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.overlapping(ipLeft, ipRight);
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.overlapping(ipBuild, ipProbe);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtilFactory.java
index a1f3203..a77ceb2 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlappingIntervalJoinUtilFactory.java
@@ -35,7 +35,7 @@
     }
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) throws HyracksDataException {
         int fieldIndex = 0;
         int partition = ctx.getTaskAttemptId().getTaskId().getPartition();
@@ -66,6 +66,6 @@
                     throw new HyracksDataException("RangeMap type is not supported");
             }
         }
-        return new OverlappingIntervalJoinUtil(keys0, keys1, partitionStart);
+        return new OverlappingIntervalJoinUtil(buildKey, probeKey, partitionStart);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtil.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtil.java
index 392c0cf..933c565 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtil.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtil.java
@@ -23,12 +23,12 @@
 
 public class OverlapsIntervalJoinUtil extends AbstractIntervalJoinUtil {
 
-    public OverlapsIntervalJoinUtil(int[] keysLeft, int[] keysRight) {
-        super(keysLeft[0], keysRight[0]);
+    public OverlapsIntervalJoinUtil(int buildKey, int probeKey) {
+        super(buildKey, probeKey);
     }
 
     @Override
-    public boolean compareInterval(AIntervalPointable ipLeft, AIntervalPointable ipRight) throws HyracksDataException {
-        return il.overlaps(ipLeft, ipRight);
+    public boolean compareInterval(AIntervalPointable ipBuild, AIntervalPointable ipProbe) throws HyracksDataException {
+        return il.overlaps(ipBuild, ipProbe);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtilFactory.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtilFactory.java
index fb8be0b..22dc816 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtilFactory.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/OverlapsIntervalJoinUtilFactory.java
@@ -24,8 +24,8 @@
     private static final long serialVersionUID = 1L;
 
     @Override
-    public IIntervalJoinUtil createIntervalMergeJoinChecker(int[] keys0, int[] keys1, IHyracksTaskContext ctx,
+    public IIntervalJoinUtil createIntervalMergeJoinUtil(int buildKey, int probeKey, IHyracksTaskContext ctx,
             int nPartitions) {
-        return new OverlapsIntervalJoinUtil(keys0, keys1);
+        return new OverlapsIntervalJoinUtil(buildKey, probeKey);
     }
 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/memory/IntervalSideTuple.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/memory/IntervalSideTuple.java
index cffc491..34c1e0e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/memory/IntervalSideTuple.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/joins/interval/utils/memory/IntervalSideTuple.java
@@ -77,23 +77,15 @@
         return end;
     }
 
-    public boolean hasMoreMatches(IntervalSideTuple ist) throws HyracksDataException {
-        return imjc.checkIfMoreMatches(accessor, tupleIndex, ist.accessor, ist.tupleIndex);
-    }
-
     public boolean compareJoin(IntervalSideTuple ist) throws HyracksDataException {
-        return imjc.checkToSaveInResult(accessor, tupleIndex, ist.accessor, ist.tupleIndex, false);
+        return imjc.checkToSaveInResult(accessor, tupleIndex, ist.accessor, ist.tupleIndex);
     }
 
-    public boolean removeFromMemory(IntervalSideTuple ist) throws HyracksDataException {
+    public boolean removeFromMemory(IntervalSideTuple ist) {
         return imjc.checkToRemoveInMemory(accessor, tupleIndex, ist.accessor, ist.tupleIndex);
     }
 
-    public boolean checkForEarlyExit(IntervalSideTuple ist) throws HyracksDataException {
+    public boolean checkForEarlyExit(IntervalSideTuple ist) {
         return imjc.checkForEarlyExit(accessor, tupleIndex, ist.accessor, ist.tupleIndex);
     }
-
-    public boolean startsBefore(IntervalSideTuple ist) {
-        return start <= ist.start;
-    }
 }
