Merge asterix_stabilization into asterix_stabilization_result_distribution.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_result_distribution@1358 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/data/temporal/temporalData.json b/asterix-app/data/temporal/temporalData.json
index 520fd4b..5b3a0f5 100644
--- a/asterix-app/data/temporal/temporalData.json
+++ b/asterix-app/data/temporal/temporalData.json
@@ -1,3 +1,3 @@
-{"id": "001", "dateField": date("-2012-12-12"), "dateFieldPlus": date("0990-01-01"), "timeField": time("23:49:12.39Z"), "timeFieldPlus": time("03:23:12.2"), "datetimeField": datetime("2012-12-12T00:00:00.001"), "datetimeFieldPlus": datetime("-00130810T221015398"), "durationField": duration("P20Y19DT3H74M23.34S"), "durationFieldPlus": duration("-P2MT4M300.68S"), "intervalField": dtinterval("2012-12-12T00:00:00.001,20130810T221015398") }
-{"id": "002", "datetimeField": datetime("19201220T232918478") }
-{"id": "003", "intervalPlus": tinterval("19:23:32.328Z,23:20:20") }
\ No newline at end of file
+{"id": "001", "dateField": date("-2012-12-12"), "dateFieldPlus": date("0990-01-01"), "timeField": time("23:49:12.39Z"), "timeFieldPlus": time("03:23:12.2"), "datetimeField": datetime("2012-12-12T00:00:00.001"), "datetimeFieldPlus": datetime("-00130810T221015398"), "durationField": duration("P20Y19DT3H74M23.34S"), "durationFieldPlus": duration("-P2MT4M300.68S"), "intervalField": interval-datetime("2012-12-12T00:00:00.001,20130810T221015398") }
+{"id": "002", "timeField": time("12:12:12.219+08:00"), "timeField2": time("13:13:13.321-08:00"), "datetimeField": datetime("19201220T232918478-1200"), "intervalField": interval-time("12:29:30+08:00, 235959999-0800") }
+{"id": "003", "durationField": duration("-P27Y48DT2400H"), "datetimeField": datetime("-0290-03-23T00:59:48.999+07:00"), "intervalField": interval-date("-2012-03-17, 2013-04-01"), "intervalPlus": interval-time("19:23:32.328Z,23:20:20") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20.aql
new file mode 100644
index 0000000..beebca4
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20.aql
@@ -0,0 +1,50 @@
+/*
+ * Description : Test various syntax for dataset access
+ * : Using parentheses for dataset access is now optional
+ * : New syntax can use fully qualified names to access datasets.
+ * Expected Res : Success
+ * Date : 6th March 2013
+ */
+
+drop dataverse student if exists;
+drop dataverse teacher if exists;
+
+create dataverse student;
+create dataverse teacher;
+
+write output to nc1:"rttest/cross-dataverse_cross-dv20.adm";
+
+create type student.stdType as open {
+id : int32,
+name : string,
+age : int32,
+sex : string,
+dept : string
+}
+
+create type teacher.tchrType as open {
+id : int32,
+name : string,
+age : int32,
+sex : string,
+dept : string
+}
+
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
+
+insert into dataset student.ugdstd({"id":457,"name":"John Doe","age":22,"sex":"M","dept":"Dance"});
+
+insert into dataset student.gdstd({"id":418,"name":"John Smith","age":26,"sex":"M","dept":"Economics"});
+
+insert into dataset teacher.prof({"id":152,"name":"John Meyer","age":42,"sex":"M","dept":"History"});
+
+insert into dataset teacher.pstdoc({"id":259,"name":"Sophia Reece","age":36,"sex":"F","dept":"Anthropology"});
+
+for $s in dataset student.ugdstd
+for $p in dataset('teacher.prof')
+for $a in dataset("student.gdstd")
+for $b in dataset teacher.pstdoc
+return {"ug-student":$s,"prof":$p,"grd-student":$a,"postdoc":$b}
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/delete-syntax-change.aql b/asterix-app/src/test/resources/runtimets/queries/dml/delete-syntax-change.aql
new file mode 100644
index 0000000..fb9682d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/delete-syntax-change.aql
@@ -0,0 +1,43 @@
+/*
+ * Description : Test variant syntax for delete
+ * : Ending semi-colon is optional for delete
+ * Expected Res : Success
+ * Date : 6th March 2013
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type LineItemType as closed {
+ l_orderkey: int32,
+ l_partkey: int32,
+ l_suppkey: int32,
+ l_linenumber: int32,
+ l_quantity: int32,
+ l_extendedprice: double,
+ l_discount: double,
+ l_tax: double,
+ l_returnflag: string,
+ l_linestatus: string,
+ l_shipdate: string,
+ l_commitdate: string,
+ l_receiptdate: string,
+ l_shipinstruct: string,
+ l_shipmode: string,
+ l_comment: string
+}
+
+create dataset LineItem(LineItemType)
+ primary key l_orderkey, l_linenumber;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+delete $l from dataset LineItem where $l.l_orderkey>=10
+
+write output to nc1:"rttest/dml_delete-syntax-change.adm";
+for $c in dataset('LineItem')
+order by $c.l_orderkey, $c.l_linenumber
+return $c
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax.aql b/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax.aql
new file mode 100644
index 0000000..58177d3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax.aql
@@ -0,0 +1,35 @@
+/*
+ * Test case Name : insert-syntax-change.aql
+ * Description : verify various AQL syntax for insert
+ * Expected Result : Success
+ * Date : 6th March 2013
+ */
+
+drop dataverse testdv2 if exists;
+create dataverse testdv2;
+use dataverse testdv2;
+
+create type testtype as open {
+ id: int32,
+ name: string
+}
+
+create dataset testds(testtype) primary key id;
+
+ insert into dataset testds (
+ { "id": 1, "name": "Person One", "hobbies": {{"Rock", "Metal"}}}
+ );
+
+ insert into dataset testds (
+ { "id": 2, "name": "Person Two", "hobbies": {{"Rock", "Jazz"}}}
+ )
+
+ insert into dataset testds { "id": 3, "name": "Person Three", "hobbies": {{"Blues"}}};
+
+ insert into dataset testds { "id": 4, "name": "Person Four", "hobbies": {{"Metal", "Jazz"}}}
+
+write output to nc1:"rttest/dml_insert-syntax.adm";
+
+for $d in dataset("testds")
+order by $d.id
+return $d
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02.aql b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02.aql
new file mode 100644
index 0000000..7f01c3e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02.aql
@@ -0,0 +1,48 @@
+/*
+ * Description : Test variant syntax for dataset access (scan)
+ * : using parentheses and quotes is optional
+ * Expected Res : Success
+ * Date : 6th March 2013
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type AddressType as open {
+ number: int32,
+ street: string,
+ city: string
+}
+
+create type AllType as open {
+ id: int32,
+ name: string,
+ age: float,
+ salary: double,
+ married: boolean,
+ interests: {{string}},
+ children: [string],
+ address: AddressType,
+ dob: date,
+ time: time,
+ datetime: datetime,
+ duration: duration,
+ location2d: point,
+ location3d: point3d,
+ line: line,
+ polygon: polygon,
+ circle: circle
+
+ // binary
+ // union
+}
+
+create external dataset All(AllType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/allData.json"),("format"="adm"));
+
+write output to nc1:"rttest/scan_alltypes_02.adm";
+
+for $a in dataset All
+return $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/invalid-scan-syntax.aql b/asterix-app/src/test/resources/runtimets/queries/scan/invalid-scan-syntax.aql
new file mode 100644
index 0000000..254ecc4
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/invalid-scan-syntax.aql
@@ -0,0 +1,22 @@
+/*
+ * Description : Tests syntax error for the changed dataset access syntax
+ * Expected Result: Syntax Error from parser
+ * Date: March 6th 2013
+ */
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Employee as closed {
+id: int32,
+name: string,
+salary: int32
+}
+
+create dataset Office(Employee)
+primary key id;
+
+insert into dataset Office({"id": 1, "name": "clerk#1", "salary":120000});
+
+for $t in dataset 'test.Office'
+return $t
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.1.ddl.aql
deleted file mode 100644
index 4fcf8c9..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.1.ddl.aql
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Description : Check temporal accessors for different types
- * Expected Result : Success
- * Date : 31st Aug, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.2.update.aql
deleted file mode 100644
index 1e40f3d..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check temporal accessors for different types
- * Expected Result : Success
- * Date : 31st Aug, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.1.ddl.aql
deleted file mode 100644
index 88773ee..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.1.ddl.aql
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Description : Check the adjust-timezone functions
- * Expected Result : Success
- * Date : 15th Oct, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.2.update.aql
deleted file mode 100644
index 2a84907..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check the adjust-timezone functions
- * Expected Result : Success
- * Date : 15th Oct, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.1.ddl.aql
deleted file mode 100644
index 25db981..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.1.ddl.aql
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Description : Check the calendar-duration functions
- * Expected Result : Success
- * Date : 15th Oct, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.2.update.aql
deleted file mode 100644
index 7e27a79..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check the calendar-duration functions
- * Expected Result : Success
- * Date : 15th Oct, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.3.query.aql
deleted file mode 100644
index f56e08f..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/calendar_duration/calendar_duration.3.query.aql
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Description : Check the calendar-duration functions
- * Expected Result : Success
- * Date : 15th Oct, 2012
- */
-
-use dataverse test;
-
-let $t1 := datetime("1987-11-19T23:49:23.938")
-let $t2 := date("-1328-10-23")
-let $dr1 := duration("P7382DT39283M3921.329S")
-let $dr2 := duration("-PT63H398212M3219.328S")
-let $dr3 := duration("P1Y90M")
-let $dr4 := duration("-P3Y89M4089DT47382.983S")
-let $cdr1 := calendar-duration-from-datetime($t1, $dr1)
-let $cdr2 := calendar-duration-from-datetime($t1, $dr2)
-let $cdr3 := calendar-duration-from-datetime($t1, $dr3)
-let $cdr4 := calendar-duration-from-datetime($t1, $dr4)
-let $cdr5 := calendar-duration-from-date($t2, $dr1)
-let $cdr6 := calendar-duration-from-date($t2, $dr2)
-let $cdr7 := calendar-duration-from-date($t2, $dr3)
-let $cdr8 := calendar-duration-from-date($t2, $dr4)
-
-return { "cduration1":$cdr1, "cduration2":$cdr2, "cduration3":$cdr3, "cduration4":$cdr4, "cduration5":$cdr5, "cduration6":$cdr6, "cduration7":$cdr7, "cduration8":$cdr8 }
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.1.ddl.aql
deleted file mode 100644
index ac6c3f8..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.1.ddl.aql
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Description : Check temporal functions for date type
- * Expected Result : Success
- * Date : 24th Sep, 2012
- */
-drop dataverse test if exists;
-create dataverse test;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.2.update.aql
deleted file mode 100644
index 0a4fbb2..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check temporal functions for date type
- * Expected Result : Success
- * Date : 24th Sep, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.1.ddl.aql
deleted file mode 100644
index d984a78..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.1.ddl.aql
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Description : Check temporal functions for datetime
- * Expected Result : Success
- * Date : 24th Sep, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.2.update.aql
deleted file mode 100644
index 05af838..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check temporal functions for datetime
- * Expected Result : Success
- * Date : 24th Sep, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.1.ddl.aql
deleted file mode 100644
index 2e83832..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.1.ddl.aql
+++ /dev/null
@@ -1,19 +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 test;
-
-create type testtype as closed {
- id: string,
- dateField: date,
- timeField: time,
- datetimeField: datetime,
- durationField: duration
-}
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.2.update.aql
deleted file mode 100644
index 48e4150..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.2.update.aql
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Test case name: date-insert.aql
- * Description: verify insertion operation for date type
- * Expected result: success
- */
-
-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"="|"));
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.3.query.aql
deleted file mode 100644
index 2c21329..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_delimited_ds/insert_from_delimited_ds.3.query.aql
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Test case name: date-insert.aql
- * Description: verify insertion operation for date type
- * Expected result: success
- */
-
-use dataverse testdvt;
-
-for $r in dataset("testds")
-return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField }
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.1.ddl.aql
deleted file mode 100644
index c5befee..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.1.ddl.aql
+++ /dev/null
@@ -1,20 +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 open {
- id: string,
- dateField: date?,
- timeField: time?,
- datetimeField: datetime?,
- durationField: duration?,
- intervalField: interval?
-}
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.2.update.aql
deleted file mode 100644
index 9f92e49..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.2.update.aql
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Test case name: date-insert.aql
- * Description: verify insertion operation for date type
- * Expected result: success
- */
-
-use dataverse testdvt;
-
-create external dataset testds(testtype)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/temporal/temporalData.json"),("format"="adm"));
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.3.query.aql
deleted file mode 100644
index cd8731e..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/insert_from_ext_ds/insert_from_ext_ds.3.query.aql
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Test case name: date-insert.aql
- * Description: verify insertion operation for date type
- * Expected result: success
- */
-
-use dataverse testdvt;
-
-for $r in dataset("testds")
-return {"date": $r.dateField, "time": $r.timeField, "datetime": $r.datetimeField, "duration": $r.durationField, "interval": $r.intervalField }
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.1.ddl.aql
deleted file mode 100644
index dc64af7..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.1.ddl.aql
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Description : Check temporal functions for interval
- * Expected Result : Success
- * Date : 2nd Nov, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.2.update.aql
deleted file mode 100644
index 4330ebd..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check temporal functions for interval
- * Expected Result : Success
- * Date : 2nd Nov, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.1.ddl.aql
deleted file mode 100644
index 44244e0..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.1.ddl.aql
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Description : Check temporal functions for time
- * Expected Result : Success
- * Date : 24th Sep, 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.2.update.aql
deleted file mode 100644
index 2024d63..0000000
--- a/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.2.update.aql
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * Description : Check temporal functions for time
- * Expected Result : Success
- * Date : 24th Sep, 2012
- */
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/accessors.aql
index 4ae1853..7830438 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/accessors/accessors.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/accessors.aql
@@ -4,8 +4,12 @@
* 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/temp/adjust_timezone/adjust_timezone.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone.aql
similarity index 76%
rename from asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone.aql
index 0324094..13c2487 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/adjust_timezone/adjust_timezone.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/adjust_timezone.aql
@@ -4,10 +4,14 @@
* 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 }
+return { "string1" : $s1, "string2" : $s2 }
\ No newline at end of file
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.aql
new file mode 100644
index 0000000..2d0c91b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/calendar_duration.aql
@@ -0,0 +1,52 @@
+/*
+ * 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")
+let $dr2 := duration("-PT63H398212M3219.328S")
+let $dr3 := duration("P1Y90M")
+let $dr4 := duration("-P3Y89M4089DT47382.983S")
+let $cdr1 := calendar-duration-from-datetime($t1, $dr1)
+let $dt1 := add-datetime-duration($t1, $dr1)
+let $dtt1 := add-datetime-duration($t1, $cdr1)
+let $c1 := $dt1 = $dtt1
+let $cdr2 := calendar-duration-from-datetime($t1, $dr2)
+let $dt2 := add-datetime-duration($t1, $dr2)
+let $dtt2 := add-datetime-duration($t1, $cdr2)
+let $c2 := $dt2 = $dtt2
+let $cdr3 := calendar-duration-from-datetime($t1, $dr3)
+let $dt3 := add-datetime-duration($t1, $dr3)
+let $dtt3 := add-datetime-duration($t1, $cdr3)
+let $c3 := $dt3 = $dtt3
+let $cdr4 := calendar-duration-from-datetime($t1, $dr4)
+let $dt4 := add-datetime-duration($t1, $dr4)
+let $dtt4 := add-datetime-duration($t1, $cdr4)
+let $c4 := $dt4 = $dtt4
+let $cdr5 := calendar-duration-from-date($t2, $dr1)
+let $dt5 := add-date-duration($t2, $dr1)
+let $dtt5 := add-date-duration($t2, $cdr5)
+let $c5 := $dt5 = $dtt5
+let $cdr6 := calendar-duration-from-date($t2, $dr2)
+let $dt6 := add-date-duration($t2, $dr2)
+let $dtt6 := add-date-duration($t2, $cdr6)
+let $c6 := $dt6 = $dtt6
+let $cdr7 := calendar-duration-from-date($t2, $dr3)
+let $dt7 := add-date-duration($t2, $dr3)
+let $dtt7 := add-date-duration($t2, $cdr7)
+let $c7 := $dt7 = $dtt7
+let $cdr8 := calendar-duration-from-date($t2, $dr4)
+let $dt8 := add-date-duration($t2, $dr4)
+let $dtt8 := add-date-duration($t2, $cdr8)
+let $c8 := $dt8 = $dtt8
+
+return { "cduration1":$cdr1, "c1":$c1, "cduration2":$cdr2, "c2":$c2, "cduration3":$cdr3, "c3":$c3, "cduration4":$cdr4, "c4":$c4, "cduration5":$cdr5, "c5":$c5, "cduration6":$cdr6, "c6":$c6, "cduration7":$cdr7, "c7":$c7, "cduration8":$cdr8, "c8":$c8 }
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions.aql
similarity index 66%
rename from asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/date_functions.aql
index 2f93bcb..4f9ef5c 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/date_functions/date_functions.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/date_functions.aql
@@ -3,8 +3,12 @@
* 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)
@@ -12,9 +16,11 @@
let $d3 := date-from-datetime($dt2)
let $dr1 := duration("-P2Y1M90DT30H")
let $d4 := add-date-duration($d1, $dr1)
+let $c1 := $d1 = add-date-duration($d4, subtract-date($d1, $d4))
let $dr2 := duration("P300Y900MT360000M")
let $d5 := add-date-duration($d2, $dr2)
+let $c2 := $d2 = add-date-duration($d5, subtract-date($d2, $d5))
let $dr3 := subtract-date($d5, $d2)
let $dr4 := subtract-date($d4, $d1)
-return { "date1" : $d1, "date2" : $d2, "date3" : $d3, "date4" : $d4, "date5" : $d5, "duration1" : $dr3, "duration2" : $dr4 }
+return { "date1" : $d1, "date2" : $d2, "date3" : $d3, "date4" : $d4, "date5" : $d5, "duration1" : $dr3, "duration2" : $dr4, "c1" : $c1, "c2" : $c2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions.aql
similarity index 61%
rename from asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions.aql
index 36df410..cc68789 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/datetime_functions/datetime_functions.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/datetime_functions.aql
@@ -4,13 +4,18 @@
* 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("23:35:49.938Z")
+let $t1 := time("15:35:49.938-0800")
let $dt2 := datetime-from-date-time($d1, $t1)
let $dr1 := subtract-datetime($dt2, $dt1)
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 }
+return { "datetime1" : $dt1, "datetime2" : $dt2, "datetime3" : $dt3, "duration1" : $dr1, "c1" : $c1 }
\ No newline at end of file
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
new file mode 100644
index 0000000..344db02
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_delimited_ds.aql
@@ -0,0 +1,26 @@
+/*
+ * 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_ext_ds.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds.aql
new file mode 100644
index 0000000..0a3903f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/insert_from_ext_ds.aql
@@ -0,0 +1,27 @@
+/*
+ * 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 open {
+ id: string,
+ dateField: date?,
+ timeField: time?,
+ datetimeField: datetime?,
+ durationField: duration?,
+ 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
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions.aql
similarity index 74%
rename from asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions.aql
index abda416..5831468 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/interval_functions/interval_functions.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/interval_functions.aql
@@ -4,11 +4,15 @@
* 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-06-30", "2013-01-01")
+let $itv3 := interval-from-date("2010-12-21", "2013-01-01")
let $blnBefore1 := interval-before($itv1, $itv2)
let $blnAfter1 := interval-after($itv2, $itv1)
let $blnBefore2 := interval-before($itv1, $itv3)
@@ -24,11 +28,11 @@
let $itv7 := interval-from-time("12:32:38", "20:29:20")
let $itv8 := interval-from-time("17:48:19", "22:19:49")
-let $itv9 := interval-from-time("01:32:49", "12:33:00")
+let $itv9 := interval-from-time("01:32:49", "17:48:19")
let $blnOverlaps1 := interval-overlaps($itv7, $itv8)
let $blnOverlapped1 := interval-overlapped-by($itv8, $itv7)
-let $blnOverlaps2 := interval-overlaps($itv8, $itv7)
-let $blnOverlapped2 := interval-overlapped-by($itv7, $itv8)
+let $blnOverlaps2 := interval-overlaps($itv9, $itv8)
+let $blnOverlapped2 := interval-overlapped-by($itv8, $itv9)
let $blnOverlap1 := overlap($itv9, $itv7)
let $blnOverlap2 := overlap($itv9, $itv8)
@@ -38,10 +42,13 @@
let $blnStartedBy1 := interval-started-by($itv1, $itv10)
let $blnStartedBy2 := interval-started-by($itv10, $itv2)
-let $blnCovers1 := interval-covers($itv6, $itv4)
-let $blnCovers2 := interval-covers($itv6, $itv5)
-let $blnCoveredBy1 := interval-covered-by($itv4, $itv6)
-let $blnCoveredBy2 := interval-covered-by($itv5, $itv6)
+let $itv10 := interval-from-datetime("19000707T020202222", "2013-08-07T03:03:03.333")
+let $itv11 := interval-from-datetime("19990707T020202222", "2013-08-07T03:03:03.333")
+let $itv12 := interval-from-datetime("-19990707T020202222", "2013-08-07T03:03:03.333")
+let $blnCovers1 := interval-covers($itv10, $itv11)
+let $blnCovers2 := interval-covers($itv10, $itv12)
+let $blnCoveredBy1 := interval-covered-by($itv11, $itv10)
+let $blnCoveredBy2 := interval-covered-by($itv12, $itv10)
let $itv11 := interval-from-time("19:00:00.009", "20:29:20.000")
let $blnEnds1 := interval-ends($itv11, $itv7)
@@ -49,4 +56,4 @@
let $blnEndedBy1 := interval-ended-by($itv7, $itv11)
let $blnEndedBy2 := interval-ended-by($itv8, $itv11)
-return { "before1" : $blnBefore1, "before2" : $blnBefore2, "after1" : $blnAfter1, "after2" : $blnAfter2, "meet1" : $blnMeet1, "meet2" : $blnMeet2, "metby1" : $blnMetBy1, "metby2" : $blnMetBy2, "overlaps1" : $blnOverlaps1, "overlaps2" : $blnOverlaps2, "overlapped1" : $blnOverlapped1, "overlapped2" : $blnOverlapped2, "overlap1" : $blnOverlap1, "overlap2" : $blnOverlap2, "starts1" : $blnStarts1, "starts2" : $blnStarts2, "startedby1" : $blnStartedBy1, "startedby2" : $blnStartedBy2, "covers1" : $blnCovers1, "covers2" : $blnCovers2, "coveredby1" : $blnCoveredBy1, "coveredby2" : $blnCoveredBy2, "ends1" : $blnEnds1, "ends2" : $blnEnds2, "endedby1" : $blnEndedBy1, "endedby2" : $blnEndedBy2 }
+return { "before1" : $blnBefore1, "before2" : $blnBefore2, "after1" : $blnAfter1, "after2" : $blnAfter2, "meet1" : $blnMeet1, "meet2" : $blnMeet2, "metby1" : $blnMetBy1, "metby2" : $blnMetBy2, "overlaps1" : $blnOverlaps1, "overlaps2" : $blnOverlaps2, "overlapped1" : $blnOverlapped1, "overlapped2" : $blnOverlapped2, "overlap1" : $blnOverlap1, "overlap2" : $blnOverlap2, "starts1" : $blnStarts1, "starts2" : $blnStarts2, "startedby1" : $blnStartedBy1, "startedby2" : $blnStartedBy2, "covers1" : $blnCovers1, "covers2" : $blnCovers2, "coveredby1" : $blnCoveredBy1, "coveredby2" : $blnCoveredBy2, "ends1" : $blnEnds1, "ends2" : $blnEnds2, "endedby1" : $blnEndedBy1, "endedby2" : $blnEndedBy2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions.aql
similarity index 68%
rename from asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/temporal/time_functions.aql
index 9794bb3..c1d39fc 100644
--- a/asterix-app/src/test/resources/runtimets/queries/temp/time_functions/time_functions.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/temporal/time_functions.aql
@@ -4,8 +4,12 @@
* 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)
@@ -13,12 +17,14 @@
let $t3 := time-from-datetime($dt2)
let $dr1 := duration("-PT30H")
let $t4 := add-time-duration($t1, $dr1)
+let $c1 := $t1 = add-time-duration($t4, subtract-time($t1, $t4))
let $dr2 := duration("PT36M")
let $t5 := add-time-duration($t2, $dr2)
+let $c2 := $t2 = add-time-duration($t5, subtract-time($t2, $t5))
let $dr3 := subtract-time($t5, $t2)
let $dr4 := subtract-time($t4, $t1)
let $ct := current-time()
let $cd := current-date()
let $cdt := current-datetime()
-return { "time1" : $t1, "time2" : $t2, "time3" : $t3, "time4" : $t4, "time5" : $t5, "duration1" : $dr3, "duration2" : $dr4 }
+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
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv20.adm b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv20.adm
new file mode 100644
index 0000000..83de609
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv20.adm
@@ -0,0 +1 @@
+{ "ug-student": { "id": 457, "name": "John Doe", "age": 22, "sex": "M", "dept": "Dance" }, "prof": { "id": 152, "name": "John Meyer", "age": 42, "sex": "M", "dept": "History" }, "grd-student": { "id": 418, "name": "John Smith", "age": 26, "sex": "M", "dept": "Economics" }, "postdoc": { "id": 259, "name": "Sophia Reece", "age": 36, "sex": "F", "dept": "Anthropology" } }
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/delete-syntax-change.adm b/asterix-app/src/test/resources/runtimets/results/dml/delete-syntax-change.adm
new file mode 100644
index 0000000..7039cfe
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/dml/delete-syntax-change.adm
@@ -0,0 +1,25 @@
+{ "l_orderkey": 1, "l_partkey": 156, "l_suppkey": 4, "l_linenumber": 1, "l_quantity": 17, "l_extendedprice": 17954.55d, "l_discount": 0.04d, "l_tax": 0.02d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-03-13", "l_commitdate": "1996-02-12", "l_receiptdate": "1996-03-22", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "TRUCK", "l_comment": "egular courts above the" }
+{ "l_orderkey": 1, "l_partkey": 68, "l_suppkey": 9, "l_linenumber": 2, "l_quantity": 36, "l_extendedprice": 34850.16d, "l_discount": 0.09d, "l_tax": 0.06d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-04-12", "l_commitdate": "1996-02-28", "l_receiptdate": "1996-04-20", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "MAIL", "l_comment": "ly final dependencies: slyly bold " }
+{ "l_orderkey": 1, "l_partkey": 64, "l_suppkey": 5, "l_linenumber": 3, "l_quantity": 8, "l_extendedprice": 7712.48d, "l_discount": 0.1d, "l_tax": 0.02d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-01-29", "l_commitdate": "1996-03-05", "l_receiptdate": "1996-01-31", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "REG AIR", "l_comment": "riously. regular, express dep" }
+{ "l_orderkey": 1, "l_partkey": 3, "l_suppkey": 6, "l_linenumber": 4, "l_quantity": 28, "l_extendedprice": 25284.0d, "l_discount": 0.09d, "l_tax": 0.06d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-04-21", "l_commitdate": "1996-03-30", "l_receiptdate": "1996-05-16", "l_shipinstruct": "NONE", "l_shipmode": "AIR", "l_comment": "lites. fluffily even de" }
+{ "l_orderkey": 1, "l_partkey": 25, "l_suppkey": 8, "l_linenumber": 5, "l_quantity": 24, "l_extendedprice": 22200.48d, "l_discount": 0.1d, "l_tax": 0.04d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-03-30", "l_commitdate": "1996-03-14", "l_receiptdate": "1996-04-01", "l_shipinstruct": "NONE", "l_shipmode": "FOB", "l_comment": " pending foxes. slyly re" }
+{ "l_orderkey": 1, "l_partkey": 16, "l_suppkey": 3, "l_linenumber": 6, "l_quantity": 32, "l_extendedprice": 29312.32d, "l_discount": 0.07d, "l_tax": 0.02d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-01-30", "l_commitdate": "1996-02-07", "l_receiptdate": "1996-02-03", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "MAIL", "l_comment": "arefully slyly ex" }
+{ "l_orderkey": 2, "l_partkey": 107, "l_suppkey": 2, "l_linenumber": 1, "l_quantity": 38, "l_extendedprice": 38269.8d, "l_discount": 0.0d, "l_tax": 0.05d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1997-01-28", "l_commitdate": "1997-01-14", "l_receiptdate": "1997-02-02", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "RAIL", "l_comment": "ven requests. deposits breach a" }
+{ "l_orderkey": 3, "l_partkey": 5, "l_suppkey": 2, "l_linenumber": 1, "l_quantity": 45, "l_extendedprice": 40725.0d, "l_discount": 0.06d, "l_tax": 0.0d, "l_returnflag": "R", "l_linestatus": "F", "l_shipdate": "1994-02-02", "l_commitdate": "1994-01-04", "l_receiptdate": "1994-02-23", "l_shipinstruct": "NONE", "l_shipmode": "AIR", "l_comment": "ongside of the furiously brave acco" }
+{ "l_orderkey": 3, "l_partkey": 20, "l_suppkey": 10, "l_linenumber": 2, "l_quantity": 49, "l_extendedprice": 45080.98d, "l_discount": 0.1d, "l_tax": 0.0d, "l_returnflag": "R", "l_linestatus": "F", "l_shipdate": "1993-11-09", "l_commitdate": "1993-12-20", "l_receiptdate": "1993-11-24", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "RAIL", "l_comment": " unusual accounts. eve" }
+{ "l_orderkey": 3, "l_partkey": 129, "l_suppkey": 8, "l_linenumber": 3, "l_quantity": 27, "l_extendedprice": 27786.24d, "l_discount": 0.06d, "l_tax": 0.07d, "l_returnflag": "A", "l_linestatus": "F", "l_shipdate": "1994-01-16", "l_commitdate": "1993-11-22", "l_receiptdate": "1994-01-23", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "SHIP", "l_comment": "nal foxes wake. " }
+{ "l_orderkey": 3, "l_partkey": 30, "l_suppkey": 5, "l_linenumber": 4, "l_quantity": 2, "l_extendedprice": 1860.06d, "l_discount": 0.01d, "l_tax": 0.06d, "l_returnflag": "A", "l_linestatus": "F", "l_shipdate": "1993-12-04", "l_commitdate": "1994-01-07", "l_receiptdate": "1994-01-01", "l_shipinstruct": "NONE", "l_shipmode": "TRUCK", "l_comment": "y. fluffily pending d" }
+{ "l_orderkey": 3, "l_partkey": 184, "l_suppkey": 5, "l_linenumber": 5, "l_quantity": 28, "l_extendedprice": 30357.04d, "l_discount": 0.04d, "l_tax": 0.0d, "l_returnflag": "R", "l_linestatus": "F", "l_shipdate": "1993-12-14", "l_commitdate": "1994-01-10", "l_receiptdate": "1994-01-01", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "FOB", "l_comment": "ages nag slyly pending" }
+{ "l_orderkey": 3, "l_partkey": 63, "l_suppkey": 8, "l_linenumber": 6, "l_quantity": 26, "l_extendedprice": 25039.56d, "l_discount": 0.1d, "l_tax": 0.02d, "l_returnflag": "A", "l_linestatus": "F", "l_shipdate": "1993-10-29", "l_commitdate": "1993-12-18", "l_receiptdate": "1993-11-04", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "RAIL", "l_comment": "ges sleep after the caref" }
+{ "l_orderkey": 4, "l_partkey": 89, "l_suppkey": 10, "l_linenumber": 1, "l_quantity": 30, "l_extendedprice": 29672.4d, "l_discount": 0.03d, "l_tax": 0.08d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-01-10", "l_commitdate": "1995-12-14", "l_receiptdate": "1996-01-18", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "REG AIR", "l_comment": "- quickly regular packages sleep. idly" }
+{ "l_orderkey": 5, "l_partkey": 109, "l_suppkey": 10, "l_linenumber": 1, "l_quantity": 15, "l_extendedprice": 15136.5d, "l_discount": 0.02d, "l_tax": 0.04d, "l_returnflag": "R", "l_linestatus": "F", "l_shipdate": "1994-10-31", "l_commitdate": "1994-08-31", "l_receiptdate": "1994-11-20", "l_shipinstruct": "NONE", "l_shipmode": "AIR", "l_comment": "ts wake furiously " }
+{ "l_orderkey": 5, "l_partkey": 124, "l_suppkey": 5, "l_linenumber": 2, "l_quantity": 26, "l_extendedprice": 26627.12d, "l_discount": 0.07d, "l_tax": 0.08d, "l_returnflag": "R", "l_linestatus": "F", "l_shipdate": "1994-10-16", "l_commitdate": "1994-09-25", "l_receiptdate": "1994-10-19", "l_shipinstruct": "NONE", "l_shipmode": "FOB", "l_comment": "sts use slyly quickly special instruc" }
+{ "l_orderkey": 5, "l_partkey": 38, "l_suppkey": 4, "l_linenumber": 3, "l_quantity": 50, "l_extendedprice": 46901.5d, "l_discount": 0.08d, "l_tax": 0.03d, "l_returnflag": "A", "l_linestatus": "F", "l_shipdate": "1994-08-08", "l_commitdate": "1994-10-13", "l_receiptdate": "1994-08-26", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "AIR", "l_comment": "eodolites. fluffily unusual" }
+{ "l_orderkey": 6, "l_partkey": 140, "l_suppkey": 6, "l_linenumber": 1, "l_quantity": 37, "l_extendedprice": 38485.18d, "l_discount": 0.08d, "l_tax": 0.03d, "l_returnflag": "A", "l_linestatus": "F", "l_shipdate": "1992-04-27", "l_commitdate": "1992-05-15", "l_receiptdate": "1992-05-02", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "TRUCK", "l_comment": "p furiously special foxes" }
+{ "l_orderkey": 7, "l_partkey": 183, "l_suppkey": 4, "l_linenumber": 1, "l_quantity": 12, "l_extendedprice": 12998.16d, "l_discount": 0.07d, "l_tax": 0.03d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-05-07", "l_commitdate": "1996-03-13", "l_receiptdate": "1996-06-03", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "FOB", "l_comment": "ss pinto beans wake against th" }
+{ "l_orderkey": 7, "l_partkey": 146, "l_suppkey": 3, "l_linenumber": 2, "l_quantity": 9, "l_extendedprice": 9415.26d, "l_discount": 0.08d, "l_tax": 0.08d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-02-01", "l_commitdate": "1996-03-02", "l_receiptdate": "1996-02-19", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "SHIP", "l_comment": "es. instructions" }
+{ "l_orderkey": 7, "l_partkey": 95, "l_suppkey": 8, "l_linenumber": 3, "l_quantity": 46, "l_extendedprice": 45774.14d, "l_discount": 0.1d, "l_tax": 0.07d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-01-15", "l_commitdate": "1996-03-27", "l_receiptdate": "1996-02-03", "l_shipinstruct": "COLLECT COD", "l_shipmode": "MAIL", "l_comment": " unusual reques" }
+{ "l_orderkey": 7, "l_partkey": 164, "l_suppkey": 5, "l_linenumber": 4, "l_quantity": 28, "l_extendedprice": 29796.48d, "l_discount": 0.03d, "l_tax": 0.04d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-03-21", "l_commitdate": "1996-04-08", "l_receiptdate": "1996-04-20", "l_shipinstruct": "NONE", "l_shipmode": "FOB", "l_comment": ". slyly special requests haggl" }
+{ "l_orderkey": 7, "l_partkey": 152, "l_suppkey": 4, "l_linenumber": 5, "l_quantity": 38, "l_extendedprice": 39981.7d, "l_discount": 0.08d, "l_tax": 0.01d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-02-11", "l_commitdate": "1996-02-24", "l_receiptdate": "1996-02-18", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "TRUCK", "l_comment": "ns haggle carefully ironic deposits. bl" }
+{ "l_orderkey": 7, "l_partkey": 80, "l_suppkey": 10, "l_linenumber": 6, "l_quantity": 35, "l_extendedprice": 34302.8d, "l_discount": 0.06d, "l_tax": 0.03d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-01-16", "l_commitdate": "1996-02-23", "l_receiptdate": "1996-01-22", "l_shipinstruct": "TAKE BACK RETURN", "l_shipmode": "FOB", "l_comment": "jole. excuses wake carefully alongside of " }
+{ "l_orderkey": 7, "l_partkey": 158, "l_suppkey": 3, "l_linenumber": 7, "l_quantity": 5, "l_extendedprice": 5290.75d, "l_discount": 0.04d, "l_tax": 0.02d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-02-10", "l_commitdate": "1996-03-26", "l_receiptdate": "1996-02-13", "l_shipinstruct": "NONE", "l_shipmode": "FOB", "l_comment": "ithely regula" }
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/insert-syntax.adm b/asterix-app/src/test/resources/runtimets/results/dml/insert-syntax.adm
new file mode 100644
index 0000000..9407868
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/dml/insert-syntax.adm
@@ -0,0 +1,4 @@
+{ "id": 1, "name": "Person One", "hobbies": {{ "Rock", "Metal" }} }
+{ "id": 2, "name": "Person Two", "hobbies": {{ "Rock", "Jazz" }} }
+{ "id": 3, "name": "Person Three", "hobbies": {{ "Blues" }} }
+{ "id": 4, "name": "Person Four", "hobbies": {{ "Metal", "Jazz" }} }
diff --git a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_02.adm b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_02.adm
new file mode 100644
index 0000000..64aee7c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_02.adm
@@ -0,0 +1 @@
+{ "id": 10, "name": "Nancy", "age": 32.5f, "salary": 12.0d, "married": true, "interests": {{ "reading", "writing" }}, "children": [ "Brad", "Scott" ], "address": { "number": 8389, "street": "Hill St.", "city": "Mountain View" }, "dob": date("-2011-01-27"), "time": time("12:20:30.000Z"), "datetime": datetime("-1951-12-27T12:20:30.000Z"), "duration": duration("P10Y11M12DT10H50M30S"), "location2d": point("41.0,44.0"), "location3d": point3d("44.0,13.0,41.0"), "line": line("10.1,11.1 10.2,11.2"), "polygon": polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), "circle": circle("10.1,11.1 10.2") }
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/calendar_duration/calendar_duration.1.adm b/asterix-app/src/test/resources/runtimets/results/temp/calendar_duration/calendar_duration.1.adm
deleted file mode 100644
index eb7d565..0000000
--- a/asterix-app/src/test/resources/runtimets/results/temp/calendar_duration/calendar_duration.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "cduration1": duration("P20Y3M13DT7H48M21.329S"), "cduration2": duration("-P9M6DT4H45M39.328S"), "cduration3": duration("P8Y6M"), "cduration4": duration("-P21Y7M10DT13H9M42.983S"), "cduration5": duration("P20Y3M12DT7H48M21.329S"), "cduration6": duration("-P9M5DT4H45M39.328S"), "cduration7": duration("P8Y6M"), "cduration8": duration("-P21Y7M10DT13H9M42.983S") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds/insert_from_ext_ds.1.adm b/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds/insert_from_ext_ds.1.adm
deleted file mode 100644
index afe2ccc..0000000
--- a/asterix-app/src/test/resources/runtimets/results/temp/insert_from_ext_ds/insert_from_ext_ds.1.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-{ "date": date("-2012-12-12"), "time": time("23:49:12.390Z"), "datetime": datetime("2012-12-12T00:00:00.001Z"), "duration": duration("P20Y19DT4H14M23.34S"), "interval": interval("datetime("2012-12-12T00:00:00.001Z"), datetime("2013-08-10T22:10:15.398Z")") }
-{ "date": null, "time": null, "datetime": datetime("1920-12-20T23:29:18.478Z"), "duration": null, "interval": null }
-{ "date": null, "time": null, "datetime": null, "duration": null, "interval": null }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/accessors/accessors.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/accessors.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temp/accessors/accessors.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/accessors.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/adjust_timezone/adjust_timezone.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/adjust_timezone.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temp/adjust_timezone/adjust_timezone.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/adjust_timezone.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.adm
new file mode 100644
index 0000000..957388f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/temporal/calendar_duration.adm
@@ -0,0 +1 @@
+{ "cduration1": duration("P20Y3M12DT7H48M21.329S"), "c1": true, "cduration2": duration("-P9M6DT4H45M39.328S"), "c2": true, "cduration3": duration("P8Y6M"), "c3": true, "cduration4": duration("-P21Y7M10DT13H9M42.983S"), "c4": true, "cduration5": duration("P20Y3M12DT7H48M21.329S"), "c5": true, "cduration6": duration("-P9M5DT4H45M39.328S"), "c6": true, "cduration7": duration("P8Y6M"), "c7": true, "cduration8": duration("-P21Y7M10DT13H9M42.983S"), "c8": true }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/date_functions/date_functions.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/date_functions.adm
similarity index 79%
rename from asterix-app/src/test/resources/runtimets/results/temp/date_functions/date_functions.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/date_functions.adm
index 2276f85..a5285d8 100644
--- a/asterix-app/src/test/resources/runtimets/results/temp/date_functions/date_functions.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/temporal/date_functions.adm
@@ -1 +1 @@
-{ "date1": date("2012-09-17"), "date2": date("1327-12-02"), "date3": date("2012-10-10"), "date4": date("2010-05-17"), "date5": date("1703-08-09"), "duration1": duration("P137216D"), "duration2": duration("-P854D") }
\ No newline at end of file
+{ "date1": date("2012-09-17"), "date2": date("1327-12-02"), "date3": date("2012-10-10"), "date4": date("2010-05-17"), "date5": date("1703-08-09"), "duration1": duration("P137216D"), "duration2": duration("-P854D"), "c1": true, "c2": true }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/datetime_functions/datetime_functions.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions.adm
similarity index 88%
rename from asterix-app/src/test/resources/runtimets/results/temp/datetime_functions/datetime_functions.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions.adm
index 6ebc562..01f3758 100644
--- a/asterix-app/src/test/resources/runtimets/results/temp/datetime_functions/datetime_functions.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/temporal/datetime_functions.adm
@@ -1 +1 @@
-{ "datetime1": datetime("1970-01-12T01:33:27.429Z"), "datetime2": datetime("1327-12-02T23:35:49.938Z"), "datetime3": datetime("1327-12-02T23:35:49.938Z"), "duration1": duration("-P234526DT1H57M37.491S") }
\ No newline at end of file
+{ "datetime1": datetime("1970-01-12T01:33:27.429Z"), "datetime2": datetime("1327-12-02T23:35:49.938Z"), "datetime3": datetime("1327-12-02T23:35:49.938Z"), "duration1": duration("-P234526DT1H57M37.491S"), "c1": true }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/insert_from_delimited_ds/insert_from_delimited_ds.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/insert_from_delimited_ds.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temp/insert_from_delimited_ds/insert_from_delimited_ds.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/insert_from_delimited_ds.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.adm
new file mode 100644
index 0000000..b087496
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/temporal/insert_from_ext_ds.adm
@@ -0,0 +1,3 @@
+{ "date": date("-2012-12-12"), "time": time("23:49:12.390Z"), "datetime": datetime("2012-12-12T00:00:00.001Z"), "duration": duration("P20Y19DT4H14M23.34S"), "interval": interval-datetime("2012-12-12T00:00:00.001Z, 2013-08-10T22:10:15.398Z") }
+{ "date": null, "time": time("04:12:12.219Z"), "datetime": datetime("1920-12-21T11:29:18.478Z"), "duration": null, "interval": interval-time("04:29:30.000Z, 07:59:59.999Z") }
+{ "date": null, "time": null, "datetime": datetime("-0290-03-22T17:59:48.999Z"), "duration": duration("-P27Y148D"), "interval": interval-date("-2012-03-17, 2013-04-01") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/interval_functions/interval_functions.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/interval_functions.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/temp/interval_functions/interval_functions.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/interval_functions.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/temp/time_functions/time_functions.1.adm b/asterix-app/src/test/resources/runtimets/results/temporal/time_functions.adm
similarity index 75%
rename from asterix-app/src/test/resources/runtimets/results/temp/time_functions/time_functions.1.adm
rename to asterix-app/src/test/resources/runtimets/results/temporal/time_functions.adm
index 56531bd..791d652 100644
--- a/asterix-app/src/test/resources/runtimets/results/temp/time_functions/time_functions.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/temporal/time_functions.adm
@@ -1 +1 @@
-{ "time1": time("00:26:00.074Z"), "time2": time("23:35:49.938Z"), "time3": time("23:30:23.000Z"), "time4": time("18:26:00.074Z"), "time5": time("00:11:49.938Z"), "duration1": duration("-PT23H24M"), "duration2": duration("PT18H") }
\ No newline at end of file
+{ "time1": time("00:26:00.074Z"), "time2": time("23:35:49.938Z"), "time3": time("23:30:23.000Z"), "time4": time("18:26:00.074Z"), "time5": time("00:11:49.938Z"), "duration1": duration("-PT23H24M"), "duration2": duration("PT18H"), "c1": true, "c2": true }
\ No newline at end of file