You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by pr...@apache.org on 2016/10/04 06:26:48 UTC

[1/2] asterixdb git commit: Interval join test questions for AQL.

Repository: asterixdb
Updated Branches:
  refs/heads/master 717e9415c -> 2e3d16739


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.4.adm
new file mode 100644
index 0000000..f38e40b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.4.adm
@@ -0,0 +1,5 @@
+{ "staff": "Franklin", "student": "Olga" }
+{ "staff": "Maryann", "student": "Charles" }
+{ "staff": "Maryann", "student": "Frank" }
+{ "staff": "Maryann", "student": "Mary" }
+{ "staff": "Maryann", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.3.adm
new file mode 100644
index 0000000..4e22101
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.3.adm
@@ -0,0 +1,15 @@
+{ "staff": "Elisabeth", "student": "Karen" }
+{ "staff": "Elisabeth", "student": "Mary" }
+{ "staff": "Elisabeth", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Tess" }
+{ "staff": "Franklin", "student": "Karen" }
+{ "staff": "Maryann", "student": "Karen" }
+{ "staff": "Maryann", "student": "Steve" }
+{ "staff": "Maryann", "student": "Tess" }
+{ "staff": "Vicky", "student": "Charles" }
+{ "staff": "Vicky", "student": "Frank" }
+{ "staff": "Vicky", "student": "Karen" }
+{ "staff": "Vicky", "student": "Mary" }
+{ "staff": "Vicky", "student": "Olga" }
+{ "staff": "Vicky", "student": "Steve" }
+{ "staff": "Vicky", "student": "Tess" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.4.adm
new file mode 100644
index 0000000..1a67e10
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_covers/interval_covers.4.adm
@@ -0,0 +1,4 @@
+{ "staff": "Zack", "student": "Charles" }
+{ "staff": "Zack", "student": "Frank" }
+{ "staff": "Zack", "student": "Mary" }
+{ "staff": "Zack", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.3.adm
new file mode 100644
index 0000000..5af9101
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.3.adm
@@ -0,0 +1,7 @@
+{ "staff": "Elisabeth", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Tess" }
+{ "staff": "Franklin", "student": "Karen" }
+{ "staff": "Maryann", "student": "Steve" }
+{ "staff": "Maryann", "student": "Tess" }
+{ "staff": "Vicky", "student": "Steve" }
+{ "staff": "Vicky", "student": "Tess" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.4.adm
new file mode 100644
index 0000000..5857139
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_ends/interval_ends.4.adm
@@ -0,0 +1 @@
+{ "staff": "Zack", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.3.adm
new file mode 100644
index 0000000..5568195
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.3.adm
@@ -0,0 +1,2 @@
+{ "staff": "Alex", "student": "Tess" }
+{ "staff": "Henry", "student": "Tess" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.4.adm
new file mode 100644
index 0000000..cd4b3ba
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_meets/interval_meets.4.adm
@@ -0,0 +1,4 @@
+{ "staff": "Alex", "student": "Olga" }
+{ "staff": "Franklin", "student": "Charles" }
+{ "staff": "Franklin", "student": "Frank" }
+{ "staff": "Henry", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm
new file mode 100644
index 0000000..4ecd143
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm
@@ -0,0 +1,35 @@
+{ "staff": "Alex", "student": "Charles" }
+{ "staff": "Alex", "student": "Frank" }
+{ "staff": "Alex", "student": "Karen" }
+{ "staff": "Alex", "student": "Mary" }
+{ "staff": "Alex", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Charles" }
+{ "staff": "Elisabeth", "student": "Frank" }
+{ "staff": "Elisabeth", "student": "Karen" }
+{ "staff": "Elisabeth", "student": "Mary" }
+{ "staff": "Elisabeth", "student": "Olga" }
+{ "staff": "Elisabeth", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Tess" }
+{ "staff": "Franklin", "student": "Karen" }
+{ "staff": "Franklin", "student": "Mary" }
+{ "staff": "Franklin", "student": "Steve" }
+{ "staff": "Franklin", "student": "Tess" }
+{ "staff": "Henry", "student": "Charles" }
+{ "staff": "Henry", "student": "Frank" }
+{ "staff": "Henry", "student": "Karen" }
+{ "staff": "Henry", "student": "Mary" }
+{ "staff": "Henry", "student": "Steve" }
+{ "staff": "Maryann", "student": "Karen" }
+{ "staff": "Maryann", "student": "Steve" }
+{ "staff": "Maryann", "student": "Tess" }
+{ "staff": "Vicky", "student": "Charles" }
+{ "staff": "Vicky", "student": "Frank" }
+{ "staff": "Vicky", "student": "Karen" }
+{ "staff": "Vicky", "student": "Mary" }
+{ "staff": "Vicky", "student": "Olga" }
+{ "staff": "Vicky", "student": "Steve" }
+{ "staff": "Vicky", "student": "Tess" }
+{ "staff": "Zack", "student": "Charles" }
+{ "staff": "Zack", "student": "Frank" }
+{ "staff": "Zack", "student": "Mary" }
+{ "staff": "Zack", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm
new file mode 100644
index 0000000..4ecd143
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm
@@ -0,0 +1,35 @@
+{ "staff": "Alex", "student": "Charles" }
+{ "staff": "Alex", "student": "Frank" }
+{ "staff": "Alex", "student": "Karen" }
+{ "staff": "Alex", "student": "Mary" }
+{ "staff": "Alex", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Charles" }
+{ "staff": "Elisabeth", "student": "Frank" }
+{ "staff": "Elisabeth", "student": "Karen" }
+{ "staff": "Elisabeth", "student": "Mary" }
+{ "staff": "Elisabeth", "student": "Olga" }
+{ "staff": "Elisabeth", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Tess" }
+{ "staff": "Franklin", "student": "Karen" }
+{ "staff": "Franklin", "student": "Mary" }
+{ "staff": "Franklin", "student": "Steve" }
+{ "staff": "Franklin", "student": "Tess" }
+{ "staff": "Henry", "student": "Charles" }
+{ "staff": "Henry", "student": "Frank" }
+{ "staff": "Henry", "student": "Karen" }
+{ "staff": "Henry", "student": "Mary" }
+{ "staff": "Henry", "student": "Steve" }
+{ "staff": "Maryann", "student": "Karen" }
+{ "staff": "Maryann", "student": "Steve" }
+{ "staff": "Maryann", "student": "Tess" }
+{ "staff": "Vicky", "student": "Charles" }
+{ "staff": "Vicky", "student": "Frank" }
+{ "staff": "Vicky", "student": "Karen" }
+{ "staff": "Vicky", "student": "Mary" }
+{ "staff": "Vicky", "student": "Olga" }
+{ "staff": "Vicky", "student": "Steve" }
+{ "staff": "Vicky", "student": "Tess" }
+{ "staff": "Zack", "student": "Charles" }
+{ "staff": "Zack", "student": "Frank" }
+{ "staff": "Zack", "student": "Mary" }
+{ "staff": "Zack", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.adm
new file mode 100644
index 0000000..94ac56a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.3.adm
@@ -0,0 +1,6 @@
+{ "staff": "Alex", "student": "Karen" }
+{ "staff": "Alex", "student": "Steve" }
+{ "staff": "Franklin", "student": "Steve" }
+{ "staff": "Franklin", "student": "Tess" }
+{ "staff": "Henry", "student": "Karen" }
+{ "staff": "Henry", "student": "Steve" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.4.adm
new file mode 100644
index 0000000..9e5549f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_overlaps/interval_overlaps.4.adm
@@ -0,0 +1,10 @@
+{ "staff": "Alex", "student": "Charles" }
+{ "staff": "Alex", "student": "Frank" }
+{ "staff": "Alex", "student": "Mary" }
+{ "staff": "Elisabeth", "student": "Charles" }
+{ "staff": "Elisabeth", "student": "Frank" }
+{ "staff": "Elisabeth", "student": "Olga" }
+{ "staff": "Franklin", "student": "Mary" }
+{ "staff": "Henry", "student": "Charles" }
+{ "staff": "Henry", "student": "Frank" }
+{ "staff": "Henry", "student": "Mary" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.3.adm
new file mode 100644
index 0000000..54ab54e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.3.adm
@@ -0,0 +1 @@
+{ "staff": "Zack", "student": "Mary" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.4.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.4.adm
new file mode 100644
index 0000000..6cd921a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_starts/interval_starts.4.adm
@@ -0,0 +1,4 @@
+{ "staff": "Elisabeth", "student": "Mary" }
+{ "staff": "Vicky", "student": "Charles" }
+{ "staff": "Vicky", "student": "Frank" }
+{ "staff": "Vicky", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index 0a45cdf..e90b2e7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -16,12 +16,15 @@
  ! specific language governing permissions and limitations
  ! under the License.
  !-->
+<!-- Keep test-suite list in Alphabetical order. -->
 <!DOCTYPE test-suite [
 
+             <!ENTITY APIQueries SYSTEM "queries/api/APIQueries.xml">
              <!ENTITY ComparisonQueries SYSTEM "queries/comparison/ComparisonQueries.xml">
-             <!ENTITY RecordsQueries SYSTEM "queries/records/RecordsQueries.xml">
              <!ENTITY DeepEqualQueries SYSTEM "queries/comparison/deep_equal/DeepEqualQueries.xml">
-             <!ENTITY APIQueries SYSTEM "queries/api/APIQueries.xml">
+             <!ENTITY RecordsQueries SYSTEM "queries/records/RecordsQueries.xml">
+             <!ENTITY TemporalQueries SYSTEM "queries/temporal/TemporalQueries.xml">
+
              ]>
 
 <test-suite
@@ -4867,7 +4870,7 @@
     </test-case>
     <test-case FilePath="scan">
       <compilation-unit name="alltypes_01">
-        <parameter name="wrapper-array" value="true"/>
+        <parameter name="wrapper-array" value="true" />
         <output-dir compare="Text">alltypes_01-wrapped</output-dir>
       </compilation-unit>
     </test-case>
@@ -4878,7 +4881,7 @@
     </test-case>
     <test-case FilePath="scan">
       <compilation-unit name="alltypes_01">
-        <parameter name="wrapper-array" value="false"/>
+        <parameter name="wrapper-array" value="false" />
         <output-dir compare="Lossless-JSON">alltypes_01-losslessjson-unwrapped</output-dir>
       </compilation-unit>
     </test-case>
@@ -6709,138 +6712,7 @@
     </test-case>
   </test-group>
   <test-group name="temporal">
-    <test-case FilePath="temporal">
-      <compilation-unit name="overlap_bins_gby_3">
-        <output-dir compare="Text">overlap_bins_gby_3</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="agg_01">
-        <output-dir compare="Text">agg_01</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="overlap_bins_gby_1">
-        <output-dir compare="Text">overlap_bins_gby_1</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="duration_functions">
-        <output-dir compare="Text">duration_functions</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="overlap_bins_gby_0">
-        <output-dir compare="Text">overlap_bins_gby_0</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="get_overlapping_interval">
-        <output-dir compare="Text">get_overlapping_interval</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="overlap_bins">
-        <output-dir compare="Text">overlap_bins</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="parse_02">
-        <output-dir compare="Text">parse_02</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="parse_01">
-        <output-dir compare="Text">parse_01</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="day_of_week_01">
-        <output-dir compare="Text">day_of_week_01</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="interval_bin">
-        <output-dir compare="Text">interval_bin</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="interval_bin_gby_0">
-        <output-dir compare="Text">interval_bin_gby_0</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="interval_bin_gby_1">
-        <output-dir compare="Text">interval_bin_gby_1</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="accessors">
-        <output-dir compare="Text">accessors</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="accessors_interval">
-        <output-dir compare="Text">accessors_interval</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="accessors_interval_null">
-        <output-dir compare="Text">accessors_interval_null</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="adjust_timezone">
-        <output-dir compare="Text">adjust_timezone</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="calendar_duration">
-        <output-dir compare="Text">calendar_duration</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="date_functions">
-        <output-dir compare="Text">date_functions</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="datetime_functions">
-        <output-dir compare="Text">datetime_functions</output-dir>
-      </compilation-unit>
-    </test-case>
-    <!--
-    <test-case FilePath="temporal">
-      <compilation-unit name="insert_from_delimited_ds">
-        <output-dir compare="Text">insert_from_delimited_ds</output-dir>
-      </compilation-unit>
-    </test-case>
-    -->
-    <test-case FilePath="temporal">
-      <compilation-unit name="insert_from_ext_ds">
-        <output-dir compare="Text">insert_from_ext_ds</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="insert_from_ext_ds_2">
-        <output-dir compare="Text">insert_from_ext_ds_2</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="interval_functions">
-        <output-dir compare="Text">interval_functions</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="time_functions">
-        <output-dir compare="Text">time_functions</output-dir>
-      </compilation-unit>
-    </test-case>
-    <test-case FilePath="temporal">
-      <compilation-unit name="duration_comps">
-        <output-dir compare="Text">duration_comps</output-dir>
-      </compilation-unit>
-    </test-case>
+        &TemporalQueries;
   </test-group>
   <test-group name="leftouterjoin">
     <test-case FilePath="leftouterjoin">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-doc/src/main/markdown/builtins/7_allens.md
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/7_allens.md b/asterixdb/asterix-doc/src/main/markdown/builtins/7_allens.md
index 1f69d8e..ad7bd7e 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/7_allens.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/7_allens.md
@@ -143,11 +143,8 @@ Note that `interval_overlapping` is not an Allen's Relation, but syntactic sugar
  * Return Value:
     * a `boolean` value. Specifically, `interval_overlapping(interval1, interval2)` is true if
 
-        (interval2.start >= interval1.start
-        AND interval2.start < interval1.end)
-        OR
-        (interval2.end > interval1.start
-        AND interval2.end <= interval1.end)
+        interval1.start < interval2.end
+        AND interval1.end > interval2.start
 
     * `missing` if the argument is a `missing` value,
     * `null` if any argument is a `null` value but no argument is a `missing` value,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
index 23f0da3..8f447d0 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
@@ -30,10 +30,10 @@ public class IntervalLogic implements Serializable {
 
     private static final long serialVersionUID = 1L;
     private final ComparisonHelper ch = new ComparisonHelper();
-    private final IPointable s1 = VoidPointable.FACTORY.createPointable();
-    private final IPointable e1 = VoidPointable.FACTORY.createPointable();
-    private final IPointable s2 = VoidPointable.FACTORY.createPointable();
-    private final IPointable e2 = VoidPointable.FACTORY.createPointable();
+    private final transient IPointable s1 = VoidPointable.FACTORY.createPointable();
+    private final transient IPointable e1 = VoidPointable.FACTORY.createPointable();
+    private final transient IPointable s2 = VoidPointable.FACTORY.createPointable();
+    private final transient IPointable e2 = VoidPointable.FACTORY.createPointable();
 
     public boolean validateInterval(AIntervalPointable ip1) throws HyracksDataException {
         ip1.getStart(s1);
@@ -115,10 +115,8 @@ public class IntervalLogic implements Serializable {
         ip1.getEnd(e1);
         ip2.getStart(s2);
         ip2.getEnd(e2);
-        return (ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), s1, s2) <= 0
-                && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, s2) > 0)
-                || (ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, e2) >= 0
-                        && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), s1, e2) < 0);
+        return ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), s1, e2) < 0
+                && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, s2) > 0;
     }
 
     /**


[2/2] asterixdb git commit: Interval join test questions for AQL.

Posted by pr...@apache.org.
Interval join test questions for AQL.

The system had tests for checking the interval comparison functions, but no checks for various interval joins.

Change-Id: I3e492d1afba693a50cb75918399c26b8ce19899a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1234
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Steven Jacobs <sj...@ucr.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/2e3d1673
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/2e3d1673
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/2e3d1673

Branch: refs/heads/master
Commit: 2e3d16739aa3e9ab777dd5170c559ee1e0dcfa24
Parents: 717e941
Author: Preston Carman <pr...@apache.org>
Authored: Mon Oct 3 15:48:13 2016 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Mon Oct 3 23:26:06 2016 -0700

----------------------------------------------------------------------
 .../TranslateIntervalExpressionRule.java        |  98 ++++++++--
 .../asterix-app/data/tinycollege/staff.adm      |   7 +
 .../asterix-app/data/tinycollege/students.adm   |   7 +
 .../interval_overlapping.3.adm                  |  35 ++++
 .../interval_overlapping.4.adm                  |  35 ++++
 .../queries/temporal/TemporalQueries.xml        | 186 +++++++++++++++++++
 .../interval_before/interval_before.1.ddl.aql   |  44 +++++
 .../interval_before.2.update.aql                |  31 ++++
 .../interval_before/interval_before.3.query.aql |  31 ++++
 .../interval_before/interval_before.4.query.aql |  31 ++++
 .../interval_covers/interval_covers.1.ddl.aql   |  44 +++++
 .../interval_covers.2.update.aql                |  31 ++++
 .../interval_covers/interval_covers.3.query.aql |  31 ++++
 .../interval_covers/interval_covers.4.query.aql |  31 ++++
 .../interval_ends/interval_ends.1.ddl.aql       |  44 +++++
 .../interval_ends/interval_ends.2.update.aql    |  31 ++++
 .../interval_ends/interval_ends.3.query.aql     |  31 ++++
 .../interval_ends/interval_ends.4.query.aql     |  31 ++++
 .../interval_meets/interval_meets.1.ddl.aql     |  44 +++++
 .../interval_meets/interval_meets.2.update.aql  |  31 ++++
 .../interval_meets/interval_meets.3.query.aql   |  31 ++++
 .../interval_meets/interval_meets.4.query.aql   |  31 ++++
 .../interval_overlapping.1.ddl.aql              |  44 +++++
 .../interval_overlapping.2.update.aql           |  31 ++++
 .../interval_overlapping.3.query.aql            |  31 ++++
 .../interval_overlapping.4.query.aql            |  31 ++++
 .../interval_overlaps.1.ddl.aql                 |  44 +++++
 .../interval_overlaps.2.update.aql              |  31 ++++
 .../interval_overlaps.3.query.aql               |  31 ++++
 .../interval_overlaps.4.query.aql               |  31 ++++
 .../interval_starts/interval_starts.1.ddl.aql   |  44 +++++
 .../interval_starts.2.update.aql                |  31 ++++
 .../interval_starts/interval_starts.3.query.aql |  31 ++++
 .../interval_starts/interval_starts.4.query.aql |  31 ++++
 .../interval_before/interval_before.3.adm       |   3 +
 .../interval_before/interval_before.4.adm       |   5 +
 .../interval_covers/interval_covers.3.adm       |  15 ++
 .../interval_covers/interval_covers.4.adm       |   4 +
 .../interval_ends/interval_ends.3.adm           |   7 +
 .../interval_ends/interval_ends.4.adm           |   1 +
 .../interval_meets/interval_meets.3.adm         |   2 +
 .../interval_meets/interval_meets.4.adm         |   4 +
 .../interval_overlapping.3.adm                  |  35 ++++
 .../interval_overlapping.4.adm                  |  35 ++++
 .../interval_overlaps/interval_overlaps.3.adm   |   6 +
 .../interval_overlaps/interval_overlaps.4.adm   |  10 +
 .../interval_starts/interval_starts.3.adm       |   1 +
 .../interval_starts/interval_starts.4.adm       |   4 +
 .../src/test/resources/runtimets/testsuite.xml  | 144 +-------------
 .../src/main/markdown/builtins/7_allens.md      |   7 +-
 .../functions/temporal/IntervalLogic.java       |  14 +-
 51 files changed, 1462 insertions(+), 162 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/temporal/TranslateIntervalExpressionRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/temporal/TranslateIntervalExpressionRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/temporal/TranslateIntervalExpressionRule.java
index 80cdb21..15cda86 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/temporal/TranslateIntervalExpressionRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/temporal/TranslateIntervalExpressionRule.java
@@ -19,7 +19,9 @@
 package org.apache.asterix.optimizer.rules.temporal;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.asterix.lang.common.util.FunctionUtil;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -45,6 +47,16 @@ import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
  */
 public class TranslateIntervalExpressionRule implements IAlgebraicRewriteRule {
 
+    private static final Set<FunctionIdentifier> TRANSLATABLE_INTERVALS = new HashSet<>();
+    {
+        TRANSLATABLE_INTERVALS.add(AsterixBuiltinFunctions.INTERVAL_MEETS);
+        TRANSLATABLE_INTERVALS.add(AsterixBuiltinFunctions.INTERVAL_MET_BY);
+        TRANSLATABLE_INTERVALS.add(AsterixBuiltinFunctions.INTERVAL_STARTS);
+        TRANSLATABLE_INTERVALS.add(AsterixBuiltinFunctions.INTERVAL_STARTED_BY);
+        TRANSLATABLE_INTERVALS.add(AsterixBuiltinFunctions.INTERVAL_ENDS);
+        TRANSLATABLE_INTERVALS.add(AsterixBuiltinFunctions.INTERVAL_ENDED_BY);
+    }
+
     @Override
     public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
             throws AlgebricksException {
@@ -61,7 +73,6 @@ public class TranslateIntervalExpressionRule implements IAlgebraicRewriteRule {
         SelectOperator selectOp = (SelectOperator) op;
 
         Mutable<ILogicalExpression> exprRef = selectOp.getCondition();
-        boolean modified = false;
         ILogicalExpression expr = exprRef.getValue();
         if (expr.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
             return false;
@@ -70,51 +81,96 @@ public class TranslateIntervalExpressionRule implements IAlgebraicRewriteRule {
         if (funcExpr.getArguments().size() != 2) {
             return false;
         }
+        if (!hasTranslatableInterval(funcExpr)) {
+            return false;
+        }
+
+        return translateIntervalExpression(exprRef, funcExpr);
+    }
+
+    private boolean hasTranslatableInterval(AbstractFunctionCallExpression funcExpr) {
+        if (TRANSLATABLE_INTERVALS.contains(funcExpr.getFunctionIdentifier())) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean translateIntervalExpression(Mutable<ILogicalExpression> exprRef,
+            AbstractFunctionCallExpression funcExpr) {
+        // All interval relations are translated unless specified in a hint.
+        // TODO A new strategy may be needed instead of just a simple translation.
         ILogicalExpression interval1 = funcExpr.getArguments().get(0).getValue();
         ILogicalExpression interval2 = funcExpr.getArguments().get(1).getValue();
         if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_MEETS)) {
             exprRef.setValue(getEqualExpr(getIntervalEndExpr(interval1), getIntervalStartExpr(interval2)));
-            modified = true;
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_MET_BY)) {
             exprRef.setValue(getEqualExpr(getIntervalStartExpr(interval1), getIntervalEndExpr(interval2)));
-            modified = true;
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_STARTS)) {
             ILogicalExpression startExpr = getEqualExpr(getIntervalStartExpr(interval1),
                     getIntervalStartExpr(interval2));
             ILogicalExpression endExpr = getLessThanOrEqualExpr(getIntervalEndExpr(interval1),
                     getIntervalEndExpr(interval2));
             exprRef.setValue(getAndExpr(startExpr, endExpr));
-            modified = true;
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_STARTED_BY)) {
             ILogicalExpression startExpr = getEqualExpr(getIntervalStartExpr(interval1),
                     getIntervalStartExpr(interval2));
             ILogicalExpression endExpr = getLessThanOrEqualExpr(getIntervalEndExpr(interval2),
                     getIntervalEndExpr(interval1));
             exprRef.setValue(getAndExpr(startExpr, endExpr));
-            modified = true;
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_ENDS)) {
             ILogicalExpression endExpr = getEqualExpr(getIntervalEndExpr(interval1), getIntervalEndExpr(interval2));
             ILogicalExpression startExpr = getLessThanOrEqualExpr(getIntervalStartExpr(interval1),
                     getIntervalStartExpr(interval2));
             exprRef.setValue(getAndExpr(startExpr, endExpr));
-            modified = true;
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_ENDED_BY)) {
             ILogicalExpression endExpr = getEqualExpr(getIntervalEndExpr(interval1), getIntervalEndExpr(interval2));
             ILogicalExpression startExpr = getLessThanOrEqualExpr(getIntervalStartExpr(interval2),
                     getIntervalStartExpr(interval1));
             exprRef.setValue(getAndExpr(startExpr, endExpr));
-            modified = true;
-        } else if (funcExpr.getFunctionInfo().equals(AsterixBuiltinFunctions.INTERVAL_BEFORE)) {
-            // Requires new strategy, no translation for this interval and the remaining listed.
+        } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_BEFORE)) {
+            exprRef.setValue(getLessThanExpr(getIntervalEndExpr(interval1), getIntervalStartExpr(interval2)));
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_AFTER)) {
+            exprRef.setValue(getGreaterThanExpr(getIntervalStartExpr(interval1), getIntervalEndExpr(interval2)));
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_OVERLAPS)) {
+            ILogicalExpression expr1 = getLessThanExpr(getIntervalStartExpr(interval1),
+                    getIntervalStartExpr(interval2));
+            ILogicalExpression expr2 = getGreaterThanExpr(getIntervalEndExpr(interval2), getIntervalEndExpr(interval1));
+            ILogicalExpression expr3 = getGreaterThanExpr(getIntervalEndExpr(interval1),
+                    getIntervalStartExpr(interval2));
+            exprRef.setValue(getAndExpr(getAndExpr(expr1, expr2), expr3));
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_OVERLAPPED_BY)) {
+            ILogicalExpression expr1 = getLessThanExpr(getIntervalStartExpr(interval2),
+                    getIntervalStartExpr(interval1));
+            ILogicalExpression expr2 = getGreaterThanExpr(getIntervalEndExpr(interval1), getIntervalEndExpr(interval2));
+            ILogicalExpression expr3 = getGreaterThanExpr(getIntervalEndExpr(interval2),
+                    getIntervalStartExpr(interval1));
+            exprRef.setValue(getAndExpr(getAndExpr(expr1, expr2), expr3));
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_OVERLAPPING)) {
+            ILogicalExpression startExpr = getLessThanOrEqualExpr(getIntervalStartExpr(interval1),
+                    getIntervalEndExpr(interval2));
+            ILogicalExpression endExpr = getGreaterThanOrEqualExpr(getIntervalEndExpr(interval1),
+                    getIntervalStartExpr(interval2));
+            ILogicalExpression startPointExpr = getNotEqualExpr(getIntervalEndExpr(interval1),
+                    getIntervalStartExpr(interval2));
+            ILogicalExpression endPointExpr = getNotEqualExpr(getIntervalStartExpr(interval1),
+                    getIntervalEndExpr(interval2));
+            exprRef.setValue(getAndExpr(getAndExpr(startExpr, endExpr), getAndExpr(startPointExpr, endPointExpr)));
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_COVERS)) {
+            ILogicalExpression startExpr = getLessThanOrEqualExpr(getIntervalStartExpr(interval1),
+                    getIntervalStartExpr(interval2));
+            ILogicalExpression endExpr = getGreaterThanOrEqualExpr(getIntervalEndExpr(interval1),
+                    getIntervalEndExpr(interval2));
+            exprRef.setValue(getAndExpr(startExpr, endExpr));
         } else if (funcExpr.getFunctionIdentifier().equals(AsterixBuiltinFunctions.INTERVAL_COVERED_BY)) {
+            ILogicalExpression startExpr = getLessThanOrEqualExpr(getIntervalStartExpr(interval2),
+                    getIntervalStartExpr(interval1));
+            ILogicalExpression endExpr = getGreaterThanOrEqualExpr(getIntervalEndExpr(interval2),
+                    getIntervalEndExpr(interval1));
+            exprRef.setValue(getAndExpr(startExpr, endExpr));
+        } else {
+            return false;
         }
-
-        return modified;
+        return true;
     }
 
     private ILogicalExpression getAndExpr(ILogicalExpression arg1, ILogicalExpression arg2) {
@@ -125,10 +181,26 @@ public class TranslateIntervalExpressionRule implements IAlgebraicRewriteRule {
         return getScalarExpr(AlgebricksBuiltinFunctions.EQ, arg1, arg2);
     }
 
+    private ILogicalExpression getNotEqualExpr(ILogicalExpression arg1, ILogicalExpression arg2) {
+        return getScalarExpr(AlgebricksBuiltinFunctions.NEQ, arg1, arg2);
+    }
+
+    private ILogicalExpression getLessThanExpr(ILogicalExpression arg1, ILogicalExpression arg2) {
+        return getScalarExpr(AlgebricksBuiltinFunctions.LT, arg1, arg2);
+    }
+
     private ILogicalExpression getLessThanOrEqualExpr(ILogicalExpression arg1, ILogicalExpression arg2) {
         return getScalarExpr(AlgebricksBuiltinFunctions.LE, arg1, arg2);
     }
 
+    private ILogicalExpression getGreaterThanExpr(ILogicalExpression arg1, ILogicalExpression arg2) {
+        return getScalarExpr(AlgebricksBuiltinFunctions.GT, arg1, arg2);
+    }
+
+    private ILogicalExpression getGreaterThanOrEqualExpr(ILogicalExpression arg1, ILogicalExpression arg2) {
+        return getScalarExpr(AlgebricksBuiltinFunctions.GE, arg1, arg2);
+    }
+
     private ILogicalExpression getIntervalStartExpr(ILogicalExpression interval) {
         return getScalarExpr(AsterixBuiltinFunctions.ACCESSOR_TEMPORAL_INTERVAL_START, interval);
     }
@@ -138,14 +210,14 @@ public class TranslateIntervalExpressionRule implements IAlgebraicRewriteRule {
     }
 
     private ILogicalExpression getScalarExpr(FunctionIdentifier func, ILogicalExpression interval) {
-        List<Mutable<ILogicalExpression>> intervalArg = new ArrayList<Mutable<ILogicalExpression>>();
+        List<Mutable<ILogicalExpression>> intervalArg = new ArrayList<>();
         intervalArg.add(new MutableObject<ILogicalExpression>(interval));
         return new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(func), intervalArg);
     }
 
     private ILogicalExpression getScalarExpr(FunctionIdentifier func, ILogicalExpression interval1,
             ILogicalExpression interval2) {
-        List<Mutable<ILogicalExpression>> intervalArg = new ArrayList<Mutable<ILogicalExpression>>();
+        List<Mutable<ILogicalExpression>> intervalArg = new ArrayList<>();
         intervalArg.add(new MutableObject<ILogicalExpression>(interval1));
         intervalArg.add(new MutableObject<ILogicalExpression>(interval2));
         return new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(func), intervalArg);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/data/tinycollege/staff.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/tinycollege/staff.adm b/asterixdb/asterix-app/data/tinycollege/staff.adm
new file mode 100644
index 0000000..4bfdd4b
--- /dev/null
+++ b/asterixdb/asterix-app/data/tinycollege/staff.adm
@@ -0,0 +1,7 @@
+{ "id": 14, "name": "Alex", "office": "A", "employment": interval(date("2003-01-01"), date("2008-01-01")) }
+{ "id": 13, "name": "Elisabeth", "office": "B", "employment": interval(date("2002-01-01"), date("2010-01-01")) }
+{ "id": 16, "name": "Franklin", "office": "A", "employment": interval(date("2004-01-01"), date("2009-01-01")) }
+{ "id": 15, "name": "Henry", "office": "C", "employment": interval(date("2003-01-01"), date("2008-01-01")) }
+{ "id": 17, "name": "Maryann", "office": "B", "employment": interval(date("2006-01-01"), date("2010-01-01")) }
+{ "id": 11, "name": "Vicky", "office": "D", "employment": interval(date("2001-01-01"), date("2010-01-01")) }
+{ "id": 12, "name": "Zack", "office": "A", "employment": interval(date("2002-01-01"), date("2003-01-01")) }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/data/tinycollege/students.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/tinycollege/students.adm b/asterixdb/asterix-app/data/tinycollege/students.adm
new file mode 100644
index 0000000..b869075
--- /dev/null
+++ b/asterixdb/asterix-app/data/tinycollege/students.adm
@@ -0,0 +1,7 @@
+{ "id": 22, "name": "Charles", "office": "X", "attendance": interval(date("2001-01-01"), date("2004-01-01")) }
+{ "id": 23, "name": "Frank", "office": "Y", "attendance": interval(date("2001-01-01"), date("2004-01-01")) }
+{ "id": 25, "name": "Karen", "office": "Y", "attendance": interval(date("2007-01-01"), date("2009-01-01")) }
+{ "id": 24, "name": "Mary", "office": "Y", "attendance": interval(date("2002-01-01"), date("2005-01-01")) }
+{ "id": 21, "name": "Olga", "office": "Z", "attendance": interval(date("2001-01-01"), date("2003-01-01")) }
+{ "id": 26, "name": "Steve", "office": "Z", "attendance": interval(date("2007-01-01"), date("2010-01-01")) }
+{ "id": 27, "name": "Tess", "office": "X", "attendance": interval(date("2008-01-01"), date("2010-01-01")) }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm b/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm
new file mode 100644
index 0000000..4ecd143
--- /dev/null
+++ b/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.3.adm
@@ -0,0 +1,35 @@
+{ "staff": "Alex", "student": "Charles" }
+{ "staff": "Alex", "student": "Frank" }
+{ "staff": "Alex", "student": "Karen" }
+{ "staff": "Alex", "student": "Mary" }
+{ "staff": "Alex", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Charles" }
+{ "staff": "Elisabeth", "student": "Frank" }
+{ "staff": "Elisabeth", "student": "Karen" }
+{ "staff": "Elisabeth", "student": "Mary" }
+{ "staff": "Elisabeth", "student": "Olga" }
+{ "staff": "Elisabeth", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Tess" }
+{ "staff": "Franklin", "student": "Karen" }
+{ "staff": "Franklin", "student": "Mary" }
+{ "staff": "Franklin", "student": "Steve" }
+{ "staff": "Franklin", "student": "Tess" }
+{ "staff": "Henry", "student": "Charles" }
+{ "staff": "Henry", "student": "Frank" }
+{ "staff": "Henry", "student": "Karen" }
+{ "staff": "Henry", "student": "Mary" }
+{ "staff": "Henry", "student": "Steve" }
+{ "staff": "Maryann", "student": "Karen" }
+{ "staff": "Maryann", "student": "Steve" }
+{ "staff": "Maryann", "student": "Tess" }
+{ "staff": "Vicky", "student": "Charles" }
+{ "staff": "Vicky", "student": "Frank" }
+{ "staff": "Vicky", "student": "Karen" }
+{ "staff": "Vicky", "student": "Mary" }
+{ "staff": "Vicky", "student": "Olga" }
+{ "staff": "Vicky", "student": "Steve" }
+{ "staff": "Vicky", "student": "Tess" }
+{ "staff": "Zack", "student": "Charles" }
+{ "staff": "Zack", "student": "Frank" }
+{ "staff": "Zack", "student": "Mary" }
+{ "staff": "Zack", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm b/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm
new file mode 100644
index 0000000..4ecd143
--- /dev/null
+++ b/asterixdb/asterix-app/rttest/results/temporal/interval_joins/interval_overlapping/interval_overlapping.4.adm
@@ -0,0 +1,35 @@
+{ "staff": "Alex", "student": "Charles" }
+{ "staff": "Alex", "student": "Frank" }
+{ "staff": "Alex", "student": "Karen" }
+{ "staff": "Alex", "student": "Mary" }
+{ "staff": "Alex", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Charles" }
+{ "staff": "Elisabeth", "student": "Frank" }
+{ "staff": "Elisabeth", "student": "Karen" }
+{ "staff": "Elisabeth", "student": "Mary" }
+{ "staff": "Elisabeth", "student": "Olga" }
+{ "staff": "Elisabeth", "student": "Steve" }
+{ "staff": "Elisabeth", "student": "Tess" }
+{ "staff": "Franklin", "student": "Karen" }
+{ "staff": "Franklin", "student": "Mary" }
+{ "staff": "Franklin", "student": "Steve" }
+{ "staff": "Franklin", "student": "Tess" }
+{ "staff": "Henry", "student": "Charles" }
+{ "staff": "Henry", "student": "Frank" }
+{ "staff": "Henry", "student": "Karen" }
+{ "staff": "Henry", "student": "Mary" }
+{ "staff": "Henry", "student": "Steve" }
+{ "staff": "Maryann", "student": "Karen" }
+{ "staff": "Maryann", "student": "Steve" }
+{ "staff": "Maryann", "student": "Tess" }
+{ "staff": "Vicky", "student": "Charles" }
+{ "staff": "Vicky", "student": "Frank" }
+{ "staff": "Vicky", "student": "Karen" }
+{ "staff": "Vicky", "student": "Mary" }
+{ "staff": "Vicky", "student": "Olga" }
+{ "staff": "Vicky", "student": "Steve" }
+{ "staff": "Vicky", "student": "Tess" }
+{ "staff": "Zack", "student": "Charles" }
+{ "staff": "Zack", "student": "Frank" }
+{ "staff": "Zack", "student": "Mary" }
+{ "staff": "Zack", "student": "Olga" }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/TemporalQueries.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/TemporalQueries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/TemporalQueries.xml
new file mode 100644
index 0000000..94030df
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/TemporalQueries.xml
@@ -0,0 +1,186 @@
+<!--
+ ! Copyright 2009-2013 by The Regents of the University of California
+ ! Licensed 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 from
+ !
+ !     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.
+ !-->
+        <test-case FilePath="temporal">
+            <compilation-unit name="overlap_bins_gby_3">
+                <output-dir compare="Text">overlap_bins_gby_3</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="agg_01">
+                <output-dir compare="Text">agg_01</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="overlap_bins_gby_1">
+                <output-dir compare="Text">overlap_bins_gby_1</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="duration_functions">
+                <output-dir compare="Text">duration_functions</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="overlap_bins_gby_0">
+                <output-dir compare="Text">overlap_bins_gby_0</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="get_overlapping_interval">
+                <output-dir compare="Text">get_overlapping_interval</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="overlap_bins">
+                <output-dir compare="Text">overlap_bins</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="parse_02">
+                <output-dir compare="Text">parse_02</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="parse_01">
+                <output-dir compare="Text">parse_01</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="day_of_week_01">
+                <output-dir compare="Text">day_of_week_01</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="interval_bin">
+                <output-dir compare="Text">interval_bin</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="interval_bin_gby_0">
+                <output-dir compare="Text">interval_bin_gby_0</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="interval_bin_gby_1">
+                <output-dir compare="Text">interval_bin_gby_1</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="accessors">
+                <output-dir compare="Text">accessors</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="accessors_interval">
+                <output-dir compare="Text">accessors_interval</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="accessors_interval_null">
+                <output-dir compare="Text">accessors_interval_null</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="adjust_timezone">
+                <output-dir compare="Text">adjust_timezone</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="calendar_duration">
+                <output-dir compare="Text">calendar_duration</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="date_functions">
+                <output-dir compare="Text">date_functions</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="datetime_functions">
+                <output-dir compare="Text">datetime_functions</output-dir>
+            </compilation-unit>
+        </test-case>
+        <!--
+        <test-case FilePath="temporal">
+            <compilation-unit name="insert_from_delimited_ds">
+                <output-dir compare="Text">insert_from_delimited_ds</output-dir>
+            </compilation-unit>
+        </test-case>
+        -->
+        <test-case FilePath="temporal">
+            <compilation-unit name="insert_from_ext_ds">
+                <output-dir compare="Text">insert_from_ext_ds</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="insert_from_ext_ds_2">
+                <output-dir compare="Text">insert_from_ext_ds_2</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="interval_functions">
+                <output-dir compare="Text">interval_functions</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal/interval_joins">
+            <compilation-unit name="interval_before">
+                <output-dir compare="Text">interval_before</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_ends">
+                <output-dir compare="Text">interval_ends</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal/interval_joins">
+            <compilation-unit name="interval_meets">
+                <output-dir compare="Text">interval_meets</output-dir>
+            </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_starts">
+                <output-dir compare="Text">interval_starts</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="time_functions">
+                <output-dir compare="Text">time_functions</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="constructor">
+            <compilation-unit name="interval">
+                <output-dir compare="Text">interval</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="temporal">
+            <compilation-unit name="duration_comps">
+                <output-dir compare="Text">duration_comps</output-dir>
+            </compilation-unit>
+        </test-case>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.3.query.aql
new file mode 100644
index 0000000..f1c4ef6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-before($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.4.query.aql
new file mode 100644
index 0000000..b2b7e56
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_before/interval_before.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-before($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.aql
new file mode 100644
index 0000000..cf14c45
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-covers($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.4.query.aql
new file mode 100644
index 0000000..9393274
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_covers/interval_covers.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-covers($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.aql
new file mode 100644
index 0000000..4e6b378
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-ends($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.4.query.aql
new file mode 100644
index 0000000..9d9f8b5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_ends/interval_ends.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-ends($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.aql
new file mode 100644
index 0000000..3f74ed5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-meets($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.4.query.aql
new file mode 100644
index 0000000..6ebaa96
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_meets/interval_meets.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-meets($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.aql
new file mode 100644
index 0000000..d59e614
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-overlapping($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.4.query.aql
new file mode 100644
index 0000000..9ffe880
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlapping/interval_overlapping.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-overlapping($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.aql
new file mode 100644
index 0000000..bc0252b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-overlaps($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.4.query.aql
new file mode 100644
index 0000000..a441fe2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_overlaps/interval_overlaps.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-overlaps($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.1.ddl.aql
new file mode 100644
index 0000000..8062540
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.1.ddl.aql
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Description      :   Check temporal join functionality for interval
+ * Expected Result  :   Success
+ * Date             :   26th Jun, 2015
+ */
+
+drop dataverse TinyCollege if exists;
+create dataverse TinyCollege;
+use dataverse TinyCollege;
+
+create type StaffType as open {
+        name: string,
+        office: string,
+        employment: interval
+}
+create dataset Staff(StaffType)
+primary key name;
+
+
+create type StudentType as open {
+        name: string,
+        office: string,
+        attendance: interval
+}
+create dataset Students(StudentType)
+primary key name;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.2.update.aql
new file mode 100644
index 0000000..ec2fdb0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.2.update.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+load dataset Staff using localfs
+(("path"="asterix_nc1://data/tinycollege/staff.adm"),("format"="adm"));
+
+load dataset Students using localfs
+(("path"="asterix_nc1://data/tinycollege/students.adm"),("format"="adm"));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.aql
new file mode 100644
index 0000000..8a1e561
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.3.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-starts($f.employment, $d.attendance)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.4.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.4.query.aql
new file mode 100644
index 0000000..742f9ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/temporal/interval_joins/interval_starts/interval_starts.4.query.aql
@@ -0,0 +1,31 @@
+/*
+ * 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             :   26th Jun, 2015
+ */
+
+use dataverse TinyCollege;
+
+for $f in dataset Staff
+for $d in dataset Students
+where interval-starts($d.attendance, $f.employment)
+order by $f.name, $d.name
+return { "staff" : $f.name, "student" : $d.name }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e3d1673/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.3.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.3.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.3.adm
new file mode 100644
index 0000000..509693a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/temporal/interval_joins/interval_before/interval_before.3.adm
@@ -0,0 +1,3 @@
+{ "staff": "Zack", "student": "Karen" }
+{ "staff": "Zack", "student": "Steve" }
+{ "staff": "Zack", "student": "Tess" }
\ No newline at end of file