updated temporal test cases to use the latest result-distribution framework.

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_result_distribution@1367 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/date_01/date_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/date_01/date_01.3.query.aql
index 152a045..325e4c4 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/date_01/date_01.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/date_01/date_01.3.query.aql
@@ -8,6 +8,7 @@
 let $c6 := date("-2043-11-19")
 let $c7 := date("-19280329")
 let $c8 := date("19280329")
+let $c9 := date("19000228")
+let $c10 := date("20000229")
 
-return {"date1": $c1, "date2": $c2, "date3": $c3, "date4": $c4, "date5": $c5, "date6": $c6, "date7": $c7, "date8": $c8}
-
+return {"date1": $c1, "date2": $c2, "date3": $c3, "date4": $c4, "date5": $c5, "date6": $c6, "date7": $c7, "date8": $c8, "date9": $c9, "date10": $c10}
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01/datetime_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01/datetime_01.3.query.aql
index 6389e5a..2482028 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01/datetime_01.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01/datetime_01.3.query.aql
@@ -15,4 +15,3 @@
 let $c13 := datetime("-19280329T17493737+0630")
 let $c14 := datetime("-19280301T05493737+0630")
 return {"datetime1": $c1, "datetime2": $c2, "datetime3": $c3, "datetime4": $c4, "datetime5": $c5, "datetime6": $c6, "datetime7": $c7, "datetime8": $c8, "datetime9": $c9, "datetime10": $c10, "datetime11": $c11, "datetime12": $c12, "datetime13": $c13, "datetime14": $c14}
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01/duration_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01/duration_01.3.query.aql
index 61785ba..6db5228 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01/duration_01.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01/duration_01.3.query.aql
@@ -1,6 +1,5 @@
 use dataverse test;
 
-
 let $c1 := duration("P30Y10M25DT13H12M50S")
 let $c2 := duration("P25DT13H12M50S")
 let $c3 := duration("PT13H12M50S")
@@ -14,4 +13,3 @@
 let $c11 := duration("PT29M90.937S")
 let $c12 := duration("P300Y15M60DT300H98M482.435S")
 return {"duration1": $c1, "duration2": $c2, "duration3": $c3, "duration4": $c4, "duration5": $c5, "duration6": $c6, "duration7": $c7, "duration8": $c8, "duration9": $c9, "duration10": $c10, "duration11": $c11, "duration12": $c12}
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/interval/interval.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/interval/interval.3.query.aql
index e0dc2bc..ebb3d2d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/interval/interval.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/interval/interval.3.query.aql
@@ -1,10 +1,10 @@
 use dataverse test;
 
 let $itv1 := interval-from-date("2010-10-30", "2012-10-21")
-let $itv2 := interval-from-time("03:04:05.678", "232425267")
-let $itv3 := interval-from-datetime("-1987-11-19T02:43:57.938", "1999-11-12T12:49:35.948")
+let $itv2 := interval-from-time("03:04:05.678-11:00", "232425267+0200")
+let $itv3 := interval-from-datetime("-1987-11-19T02:43:57.938+08:00", "19991112T124935948-0700")
 let $itv4 := interval-start-from-date("0001-12-27", "P3Y394DT48H398.483S")
-let $itv5 := interval-start-from-time("20:03:20.948", "PT48M389.938S")
+let $itv5 := interval-start-from-time("20:03:20.948", "P60DT48M389.938S")
 let $itv6 := interval-start-from-datetime("-2043-11-19T15:32:39.293", "P439Y3M20DT20H39M58.949S")
 
 return {"interval1": $itv1, "interval2": $itv2, "interval3": $itv3, "interval4": $itv4, "interval5": $itv5, "interval6": $itv6}
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/time_01/time_01.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/time_01/time_01.3.query.aql
index cc8b9c6..a5d6e54 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/time_01/time_01.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/time_01/time_01.3.query.aql
@@ -1,6 +1,5 @@
 use dataverse test;
 
-
 let $c1 := time("10:50:56.200+05:00")
 let $c2 := time("10:50:56.200-10:15")
 let $c3 := time("10:50:56")
@@ -11,6 +10,5 @@
 let $c8 := time("12:59:00.01-01:00")
 let $c9 := time("12:59:00.019-01:00")
 let $c10 := time("12590001-0100")
-let $c11 := time("125900019-0100")
+let $c11 := time("125900019+0100")
 return {"time1": $c1, "time2": $c2, "time3": $c3, "time4": $c4, "time5": $c5, "time6": $c6, "time7": $c7, "time8": $c8, "time9": $c9, "time10": $c10, "time11": $c11}
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.1.ddl.aql
new file mode 100644
index 0000000..e6a3879
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.1.ddl.aql
@@ -0,0 +1,2 @@
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/accessors.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.3.query.aql
similarity index 80%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/accessors.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.3.query.aql
index 7830438..2586d2a 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/accessors.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors/accessors.3.query.aql
@@ -1,15 +1,5 @@
-/*
- * Description      :   Check temporal accessors for different types
- * Expected Result  :   Success
- * Date             :   31st Aug, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
 use dataverse test;
 
-write output to nc1:"rttest/temporal_accessors.adm";
-
 let $c1 := date("2010-10-30")
 let $c2 := datetime("1987-11-19T23:49:23.938")
 let $c3 := date("-1987-11-19")
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone.aql
deleted file mode 100644
index 13c2487..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone.aql
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Description      :   Check the adjust-timezone functions
- * Expected Result  :   Success
- * Date             :   15th Oct, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-write output to nc1:"rttest/temporal_adjust_timezone.adm";
-
-let $t1 := time("20:15:10.327")
-let $dt1 := datetime("2010-10-23T01:12:13.329Z")
-let $s1 := adjust-time-for-timezone($t1, "+0800")
-let $s2 := adjust-datetime-for-timezone($dt1, "-0615")
-return { "string1" : $s1, "string2" : $s2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.1.ddl.aql
new file mode 100644
index 0000000..5224165
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.1.ddl.aql
@@ -0,0 +1,8 @@
+/*
+ * Description      :   Check the adjust-timezone functions
+ * Expected Result  :   Success
+ * Date             :   15th Oct, 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.3.query.aql
new file mode 100644
index 0000000..a3959b0
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone/adjust_timezone.3.query.aql
@@ -0,0 +1,7 @@
+use dataverse test;
+
+let $t1 := time("20:15:10.327")
+let $dt1 := datetime("2010-10-23T01:12:13.329Z")
+let $s1 := adjust-time-for-timezone($t1, "+0800")
+let $s2 := adjust-datetime-for-timezone($dt1, "-0615")
+return { "string1" : $s1, "string2" : $s2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.1.ddl.aql
new file mode 100644
index 0000000..7a26995
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.1.ddl.aql
@@ -0,0 +1,8 @@
+/*
+ * Description      :   Check the calendar-duration functions
+ * Expected Result  :   Success
+ * Date             :   15th Oct, 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.3.query.aql
similarity index 87%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.3.query.aql
index 2d0c91b..cbf4b7f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration/calendar_duration.3.query.aql
@@ -1,15 +1,5 @@
-/*
- * Description      :   Check the calendar-duration functions
- * Expected Result  :   Success
- * Date             :   15th Oct, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
 use dataverse test;
 
-write output to nc1:"rttest/temporal_calendar_duration.adm";
-
 let $t1 := datetime("1987-11-19T23:49:23.938")
 let $t2 := date("-1328-10-23")
 let $dr1 := duration("P7382DT39283M3921.329S")
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.1.ddl.aql
new file mode 100644
index 0000000..5f91b57
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.1.ddl.aql
@@ -0,0 +1,7 @@
+/*
+ * Description      :   Check temporal functions for date type
+ * Expected Result  :   Success
+ * Date             :   24th Sep, 2012
+ */
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.3.query.aql
similarity index 74%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/date_functions.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.3.query.aql
index 4f9ef5c..93e1366 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions/date_functions.3.query.aql
@@ -1,14 +1,5 @@
-/*
- * Description      :   Check temporal functions for date type
- * Expected Result  :   Success
- * Date             :   24th Sep, 2012
- */
-drop dataverse test if exists;
-create dataverse test;
 use dataverse test;
 
-write output to nc1:"rttest/temporal_date_functions.adm";
-
 let $d1 := date-from-unix-time-in-days(15600)
 let $dt1 := datetime("1327-12-02T23:35:49.938Z")
 let $d2 := date-from-datetime($dt1)
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.1.ddl.aql
new file mode 100644
index 0000000..dd6d579
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.1.ddl.aql
@@ -0,0 +1,8 @@
+/*
+ * Description      :   Check temporal functions for datetime
+ * Expected Result  :   Success
+ * Date             :   24th Sep, 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.3.query.aql
similarity index 63%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.3.query.aql
index cc68789..6f3dde3 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions/datetime_functions.3.query.aql
@@ -1,15 +1,5 @@
-/*
- * Description      :   Check temporal functions for datetime
- * Expected Result  :   Success
- * Date             :   24th Sep, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
 use dataverse test;
 
-write output to nc1:"rttest/temporal_datetime_functions.adm";
-
 let $dt1 := datetime-from-unix-time-in-ms(956007429)
 let $d1 := date("1327-12-02")
 let $t1 := time("15:35:49.938-0800")
@@ -18,4 +8,4 @@
 let $dt3 := add-datetime-duration($dt1, $dr1)
 let $c1 := $dt1 = add-datetime-duration($dt3, subtract-datetime($dt1, $dt3))
 
-return { "datetime1" : $dt1, "datetime2" : $dt2, "datetime3" : $dt3, "duration1" : $dr1, "c1" : $c1 }
\ No newline at end of file
+return { "datetime1" : $dt1, "datetime2" : $dt2, "datetime3" : $dt3, "duration1" : $dr1, "c1" : $c1 }
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds.aql
deleted file mode 100644
index 344db02..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds.aql
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Test case name: date-insert.aql
- * Description: verify insertion operation for date type
- * Expected result: success
- */
- 
-drop dataverse testdvt if exists;
-create dataverse testdvt;
-use dataverse testdvt;
-
-create type testtype as closed {
-  id: string,
-  dateField: date,
-  timeField: time,
-  datetimeField: datetime,
-  durationField: duration
-}
-
-write output to nc1:"rttest/temporal_insert_from_delimited_ds.adm";
-
-create external dataset testds(testtype)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/temporal/temporalData.txt"),("format"="delimited-text"),("delimiter"="|"));
-
-for $r in dataset("testds") 
-return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.1.ddl.aql
new file mode 100644
index 0000000..1c36625
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.1.ddl.aql
@@ -0,0 +1,8 @@
+/*
+ * Test case name: date-insert.aql
+ * Description: verify insertion operation for date type
+ * Expected result: success
+ */
+ 
+drop dataverse testdvt if exists;
+create dataverse testdvt;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.2.update.aql
new file mode 100644
index 0000000..547e780
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.2.update.aql
@@ -0,0 +1,5 @@
+use dataverse testdvt;
+
+create external dataset testds(testtype)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/temporal/temporalData.txt"),("format"="delimited-text"),("delimiter"="|"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.3.query.aql
new file mode 100644
index 0000000..46eaa57
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds/insert_from_delimited_ds.3.query.aql
@@ -0,0 +1,4 @@
+use dataverse testdvt;
+
+for $r in dataset("testds") 
+return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.1.ddl.aql
similarity index 70%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.1.ddl.aql
index 0a3903f..0338aef 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.1.ddl.aql
@@ -17,11 +17,6 @@
   intervalField: interval?
 }
 
-write output to nc1:"rttest/temporal_insert_from_ext_ds.adm";
-
 create external dataset testds(testtype)
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/temporal/temporalData.json"),("format"="adm"));
-
-for $r in dataset("testds") 
-return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField, "interval": $r.intervalField }
\ No newline at end of file
+(("path"="nc1://data/temporal/temporalData.json"),("format"="adm"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.3.query.aql
new file mode 100644
index 0000000..2defafc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds/insert_from_ext_ds.3.query.aql
@@ -0,0 +1,4 @@
+use dataverse testdvt;
+
+for $r in dataset("testds") 
+return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField, "interval": $r.intervalField }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.1.ddl.aql
new file mode 100644
index 0000000..4c240c6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.1.ddl.aql
@@ -0,0 +1,8 @@
+/*
+ * Description      :   Check temporal functions for interval
+ * Expected Result  :   Success
+ * Date             :   2nd Nov, 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.3.query.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.3.query.aql
index 5831468..1c773bc 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions/interval_functions.3.query.aql
@@ -1,15 +1,5 @@
-/*
- * Description      :   Check temporal functions for interval
- * Expected Result  :   Success
- * Date             :   2nd Nov, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
 use dataverse test;
 
-write output to nc1:"rttest/temporal_interval_functions.adm";
-
 let $itv1 := interval-from-date("2010-10-30", "2010-12-21")
 let $itv2 := interval-from-date("2011-10-30", "2012-10-21")
 let $itv3 := interval-from-date("2010-12-21", "2013-01-01")
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.1.ddl.aql
new file mode 100644
index 0000000..36c26ae
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.1.ddl.aql
@@ -0,0 +1,8 @@
+/*
+ * Description      :   Check temporal functions for time
+ * Expected Result  :   Success
+ * Date             :   24th Sep, 2012
+ */
+
+drop dataverse test if exists;
+create dataverse test;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.2.update.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.3.query.aql
similarity index 76%
rename from asterix-app/src/test/resources/runtimets/queries/temporal/time_functions.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.3.query.aql
index c1d39fc..ca25b8b 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions/time_functions.3.query.aql
@@ -1,15 +1,5 @@
-/*
- * Description      :   Check temporal functions for time
- * Expected Result  :   Success
- * Date             :   24th Sep, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
 use dataverse test;
 
-write output to nc1:"rttest/temporal_time_functions.adm";
-
 let $t1 := time-from-unix-time-in-ms(1560074)
 let $dt1 := datetime("1327-12-02T23:35:49.938Z")
 let $t2 := time-from-datetime($dt1)
@@ -27,4 +17,4 @@
 let $cd := current-date()
 let $cdt := current-datetime()
 
-return { "time1" : $t1, "time2" : $t2, "time3" : $t3, "time4" : $t4, "time5" : $t5, "duration1" : $dr3, "duration2" : $dr4, "c1" : $c1, "c2" : $c2  }
\ No newline at end of file
+return { "time1" : $t1, "time2" : $t2, "time3" : $t3, "time4" : $t4, "time5" : $t5, "duration1" : $dr3, "duration2" : $dr4, "c1" : $c1, "c2" : $c2  }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/date_01/date_01.1.adm b/asterix-app/src/test/resources/runtimets/results/constructor/date_01/date_01.1.adm
index 2a90c4d..8a08a03 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/date_01/date_01.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/date_01/date_01.1.adm
@@ -1 +1 @@
-{ "date1": date("2010-10-30"), "date2": date("1987-11-19"), "date3": date("-1987-11-19"), "date4": date("0001-12-27"), "date5": date("-1951-12-27"), "date6": date("-2043-11-19"), "date7": date("-1928-03-29"), "date8": date("1928-03-29") }
\ No newline at end of file
+{ "date1": date("2010-10-30"), "date2": date("1987-11-19"), "date3": date("-1987-11-19"), "date4": date("0001-12-27"), "date5": date("-1951-12-27"), "date6": date("-2043-11-19"), "date7": date("-1928-03-29"), "date8": date("1928-03-29"), "date9": date("1900-02-28"), "date10": date("2000-02-29") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01/datetime_01.1.adm b/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01/datetime_01.1.adm
index 54e76c4..fcd7b8c 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01/datetime_01.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01/datetime_01.1.adm
@@ -1 +1 @@
-{ "datetime1": datetime("2010-10-30T05:05:56.999Z"), "datetime2": datetime("2010-10-30T20:30:56.250Z"), "datetime3": datetime("1987-11-19T09:20:00.200Z"), "datetime4": datetime("1987-11-19T10:50:56.000Z"), "datetime5": datetime("-1987-11-19T16:20:56.099Z"), "datetime6": datetime("-0001-11-19T10:50:56.719Z"), "datetime7": datetime("1951-12-27T12:20:15.000Z"), "datetime8": datetime("2043-11-19T10:50:56.719Z"), "datetime9": datetime("-1928-03-30T00:19:37.374Z"), "datetime10": datetime("-1928-03-29T11:19:37.374Z"), "datetime11": datetime("-1928-03-29T17:49:37.374Z"), "datetime12": datetime("-1928-03-29T11:19:37.374Z"), "datetime13": datetime("-1928-03-29T11:19:37.370Z"), "datetime14": datetime("-1928-02-29T23:19:37.370Z") }
+{ "datetime1": datetime("2010-10-30T05:05:56.999Z"), "datetime2": datetime("2010-10-30T20:30:56.250Z"), "datetime3": datetime("1987-11-19T09:20:00.200Z"), "datetime4": datetime("1987-11-19T10:50:56.000Z"), "datetime5": datetime("-1987-11-19T16:20:56.099Z"), "datetime6": datetime("-0001-11-19T10:50:56.719Z"), "datetime7": datetime("1951-12-27T12:20:15.000Z"), "datetime8": datetime("2043-11-19T10:50:56.719Z"), "datetime9": datetime("-1928-03-30T00:19:37.374Z"), "datetime10": datetime("-1928-03-29T11:19:37.374Z"), "datetime11": datetime("-1928-03-29T17:49:37.374Z"), "datetime12": datetime("-1928-03-29T11:19:37.374Z"), "datetime13": datetime("-1928-03-29T11:19:37.370Z"), "datetime14": datetime("-1928-02-29T23:19:37.370Z") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/duration_01/duration_01.1.adm b/asterix-app/src/test/resources/runtimets/results/constructor/duration_01/duration_01.1.adm
index 3a9cbb7..f665d67 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/duration_01/duration_01.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/duration_01/duration_01.1.adm
@@ -1 +1 @@
-{ "duration1": duration("P30Y10M25DT13H12M50S"), "duration2": duration("P25DT13H12M50S"), "duration3": duration("PT13H12M50S"), "duration4": duration("P30YT12M"), "duration5": duration("PT13H"), "duration6": duration("-P30Y10M25DT13H12M50S"), "duration7": duration("-P25DT13H12M50S"), "duration8": duration("-PT13H50S"), "duration9": duration("P120D"), "duration10": duration("-P2Y4M"), "duration11": duration("PT30M30.937S"), "duration12": duration("P301Y3M72DT13H46M2.435S") }
+{ "duration1": duration("P30Y10M25DT13H12M50S"), "duration2": duration("P25DT13H12M50S"), "duration3": duration("PT13H12M50S"), "duration4": duration("P30YT12M"), "duration5": duration("PT13H"), "duration6": duration("-P30Y10M25DT13H12M50S"), "duration7": duration("-P25DT13H12M50S"), "duration8": duration("-PT13H50S"), "duration9": duration("P120D"), "duration10": duration("-P2Y4M"), "duration11": duration("PT30M30.937S"), "duration12": duration("P301Y3M72DT13H46M2.435S") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/interval/interval.1.adm b/asterix-app/src/test/resources/runtimets/results/constructor/interval/interval.1.adm
index 8fb7e25..893c3ff 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/interval/interval.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/interval/interval.1.adm
@@ -1 +1 @@
-{ "interval1": interval("date("2010-10-30"), date("2012-10-21")"), "interval2": interval("time("03:04:05.678Z"), time("23:24:25.267Z")"), "interval3": interval("datetime("-1987-11-19T02:43:57.938Z"), datetime("1999-11-12T12:49:35.948Z")"), "interval4": interval("date("0001-12-27"), date("0006-01-27")"), "interval5": interval("time("20:03:20.948Z"), time("20:57:50.886Z")"), "interval6": interval("datetime("-2043-11-19T15:32:39.293Z"), datetime("-1603-03-12T12:12:38.242Z")") }
\ No newline at end of file
+{ "interval1": interval-date("2010-10-30, 2012-10-21"), "interval2": interval-time("14:04:05.678Z, 21:24:25.267Z"), "interval3": interval-datetime("-1987-11-18T18:43:57.938Z, 1999-11-12T19:49:35.948Z"), "interval4": interval-date("0001-12-27, 0006-01-27"), "interval5": interval-time("20:03:20.948Z, 20:57:50.886Z"), "interval6": interval-datetime("-2043-11-19T15:32:39.293Z, -1603-03-12T12:12:38.242Z") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/time_01/time_01.1.adm b/asterix-app/src/test/resources/runtimets/results/constructor/time_01/time_01.1.adm
index ef6adc9..64e96dd 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/time_01/time_01.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/time_01/time_01.1.adm
@@ -1 +1 @@
-{ "time1": time("05:50:56.200Z"), "time2": time("21:05:56.200Z"), "time3": time("10:50:56.000Z"), "time4": time("10:50:56.200Z"), "time5": time("13:29:59.999Z"), "time6": time("09:15:00.000Z"), "time7": time("13:59:00.019Z"), "time8": time("13:59:00.010Z"), "time9": time("13:59:00.019Z"), "time10": time("13:59:00.010Z"), "time11": time("13:59:00.019Z") }
+{ "time1": time("05:50:56.200Z"), "time2": time("21:05:56.200Z"), "time3": time("10:50:56.000Z"), "time4": time("10:50:56.200Z"), "time5": time("13:29:59.999Z"), "time6": time("09:15:00.000Z"), "time7": time("13:59:00.019Z"), "time8": time("13:59:00.010Z"), "time9": time("13:59:00.019Z"), "time10": time("13:59:00.010Z"), "time11": time("11:59:00.019Z") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/accessors.adm b/asterix-app/src/test/resources/runtimets/results/temporal/accessors/accessors.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/accessors.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/accessors/accessors.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/adjust_timezone.adm b/asterix-app/src/test/resources/runtimets/results/temporal/adjust_timezone/adjust_timezone.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/adjust_timezone.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/adjust_timezone/adjust_timezone.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/calendar_duration.adm b/asterix-app/src/test/resources/runtimets/results/temporal/calendar_duration/calendar_duration.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/calendar_duration.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/calendar_duration/calendar_duration.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/date_functions.adm b/asterix-app/src/test/resources/runtimets/results/temporal/date_functions/date_functions.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/date_functions.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/date_functions/date_functions.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions.adm b/asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions/datetime_functions.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions/datetime_functions.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/insert_from_delimited_ds.adm b/asterix-app/src/test/resources/runtimets/results/temporal/insert_from_delimited_ds/insert_from_delimited_ds.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/insert_from_delimited_ds.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/insert_from_delimited_ds/insert_from_delimited_ds.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/insert_from_ext_ds.adm b/asterix-app/src/test/resources/runtimets/results/temporal/insert_from_ext_ds/insert_from_ext_ds.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/insert_from_ext_ds.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/insert_from_ext_ds/insert_from_ext_ds.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/interval_functions.adm b/asterix-app/src/test/resources/runtimets/results/temporal/interval_functions/interval_functions.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/interval_functions.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/interval_functions/interval_functions.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temporal/time_functions.adm b/asterix-app/src/test/resources/runtimets/results/temporal/time_functions/time_functions.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temporal/time_functions.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/time_functions/time_functions.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index cd86986..3088607 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -541,6 +541,11 @@
       </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="constructor">
       <compilation-unit name="line_01">
         <output-dir compare="Text">line_01</output-dir>
       </compilation-unit>
@@ -3967,5 +3972,57 @@
       </compilation-unit>
     </test-case>
   </test-group>
+    <test-group name="temporal">
+  	<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="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="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="constructor">
+  		<compilation-unit name="interval">
+        <output-dir compare="Text">interval</output-dir>
+      </compilation-unit>
+  	</test-case>
+  </test-group>
 </test-suite>