add test for loading + numeric promotion
diff --git a/asterix-app/data/type_promotion.adm b/asterix-app/data/type_promotion.adm
new file mode 100644
index 0000000..415ae1b
--- /dev/null
+++ b/asterix-app/data/type_promotion.adm
@@ -0,0 +1,105 @@
+{
+ "id": 1,
+ "int8": 100i8,
+ "int16": 100i8,
+ "int32": 100i8,
+ "int64": 100i8,
+ "float": 100i8,
+ "double": 100i8,
+ "int8_u": {{ 100i8 }},
+ "int8_o": [ 100i8 ],
+ "int16_u": {{ 100i8, 10000i16 }},
+ "int16_o": [ 100i8, 10000i16 ],
+ "int32_u": {{ 100i8, 10000i16, 1000000i32, 1000000 }},
+ "int32_o": [ 100i8, 10000i16, 1000000i32, 1000000 ],
+ "int64_u": {{ 100i8, 10000i16, 1000000i32, 1000000, 10000000000 }},
+ "int64_o": [ 100i8, 10000i16, 1000000i32, 1000000, 10000000000 ],
+ "float_u": {{ 100i8, 10000i16, 1000000i32, 1000000 }},
+ "float_o": [ 100i8, 10000i16, 1000000i32, 1000000 ],
+ "double_u": {{ 100i8, 10000i16, 1000000i32, 1000000, 10000000000 }},
+ "double_o": [ 100i8, 10000i16, 1000000i32, 1000000, 10000000000 ]
+}
+{
+ "id": 2,
+ "int8": 100i8,
+ "int16": 10000i16,
+ "int32": 10000i16,
+ "int64": 10000i16,
+ "float": 10000i16,
+ "double": 10000i16,
+ "int8_u": {{ }},
+ "int8_o": [ ],
+ "int16_u": {{ }},
+ "int16_o": [ ],
+ "int32_u": {{ }},
+ "int32_o": [ ],
+ "int64_u": {{ }},
+ "int64_o": [ ],
+ "float_u": {{ }},
+ "float_o": [ ],
+ "double_u": {{ }},
+ "double_o": [ ]
+}
+{
+ "id": 3,
+ "int8": 100i8,
+ "int16": 10000i16,
+ "int32": 1000000i32,
+ "int64": 1000000i32,
+ "float": 1000000i32,
+ "double": 1000000i32,
+ "int8_u": {{ }},
+ "int8_o": [ ],
+ "int16_u": {{ }},
+ "int16_o": [ ],
+ "int32_u": {{ }},
+ "int32_o": [ ],
+ "int64_u": {{ }},
+ "int64_o": [ ],
+ "float_u": {{ }},
+ "float_o": [ ],
+ "double_u": {{ }},
+ "double_o": [ ]
+}
+{
+ "id": 4,
+ "int8": 100i8,
+ "int16": 10000i16,
+ "int32": 1000000,
+ "int64": 1000000,
+ "float": 1000000,
+ "double": 1000000,
+ "int8_u": {{ }},
+ "int8_o": [ ],
+ "int16_u": {{ }},
+ "int16_o": [ ],
+ "int32_u": {{ }},
+ "int32_o": [ ],
+ "int64_u": {{ }},
+ "int64_o": [ ],
+ "float_u": {{ }},
+ "float_o": [ ],
+ "double_u": {{ }},
+ "double_o": [ ]
+}
+{
+ "id": 5,
+ "int8": 100i8,
+ "int16": 10000i16,
+ "int32": 1000000,
+ "int64": 10000000000,
+ "float": 1000000,
+ "double": 10000000000,
+ "int8_u": {{ }},
+ "int8_o": [ ],
+ "int16_u": {{ }},
+ "int16_o": [ ],
+ "int32_u": {{ }},
+ "int32_o": [ ],
+ "int64_u": {{ }},
+ "int64_o": [ ],
+ "float_u": {{ }},
+ "float_o": [ ],
+ "double_u": {{ }},
+ "double_o": [ ]
+}
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.1.ddl.aql
new file mode 100644
index 0000000..fb089b1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.1.ddl.aql
@@ -0,0 +1,28 @@
+drop dataverse TestDataverse if exists;
+create dataverse TestDataverse;
+use dataverse TestDataverse;
+
+create type TestType as {
+ id: int64,
+ int8: int8,
+ int16: int16,
+ int32: int32,
+ int64: int64,
+ float: float,
+ double: double,
+ int8_u: {{ int8 }}?,
+ int8_o: [ int8 ]?,
+ int16_u: {{ int16 }}?,
+ int16_o: [ int16 ]?,
+ int32_u: {{ int32 }}?,
+ int32_o: [ int32 ]?,
+ int64_u: {{ int64 }}?,
+ int64_o: [ int64 ]?,
+ float_u: {{ float }}?,
+ float_o: [ float ]?,
+ double_u: {{ double }}?,
+ double_o: [ double ]?
+}
+
+create dataset TestSet(TestType)
+primary key id;
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.2.update.aql
new file mode 100644
index 0000000..891d41a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.2.update.aql
@@ -0,0 +1,3 @@
+use dataverse TestDataverse;
+
+load dataset TestSet using localfs (("path"="nc1://data/type_promotion.adm"),("format"="adm"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.3.query.aql
new file mode 100644
index 0000000..207c33d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/load/type_promotion_0/type_promotion_0.3.query.aql
@@ -0,0 +1,5 @@
+use dataverse TestDataverse;
+
+for $i in dataset TestSet
+order by $i.id
+return $i
diff --git a/asterix-app/src/test/resources/runtimets/results/load/type_promotion_0/type_promotion_0.1.adm b/asterix-app/src/test/resources/runtimets/results/load/type_promotion_0/type_promotion_0.1.adm
new file mode 100644
index 0000000..be6a5d0
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/load/type_promotion_0/type_promotion_0.1.adm
@@ -0,0 +1,5 @@
+{ "id": 1i64, "int8_u": {{ 100i8 }}, "int8_o": [ 100i8 ], "int16_u": {{ 100i16, 10000i16 }}, "int16_o": [ 100i16, 10000i16 ], "int32_u": {{ 100, 10000, 1000000, 1000000 }}, "int32_o": [ 100, 10000, 1000000, 1000000 ], "int64_u": {{ 100i64, 10000i64, 1000000i64, 1000000i64, 10000000000i64 }}, "int64_o": [ 100i64, 10000i64, 1000000i64, 1000000i64, 10000000000i64 ], "float_u": {{ 100.0f, 10000.0f, 1000000.0f, 1000000.0f }}, "float_o": [ 100.0f, 10000.0f, 1000000.0f, 1000000.0f ], "double_u": {{ 100.0d, 10000.0d, 1000000.0d, 1000000.0d, 1.0E10d }}, "double_o": [ 100.0d, 10000.0d, 1000000.0d, 1000000.0d, 1.0E10d ], "int8": 100i8, "int16": 100i8, "int32": 100i8, "int64": 100i8, "float": 100i8, "double": 100i8 }
+{ "id": 2i64, "int8_u": {{ }}, "int8_o": [ ], "int16_u": {{ }}, "int16_o": [ ], "int32_u": {{ }}, "int32_o": [ ], "int64_u": {{ }}, "int64_o": [ ], "float_u": {{ }}, "float_o": [ ], "double_u": {{ }}, "double_o": [ ], "int8": 100i8, "int16": 10000i16, "int32": 10000i16, "int64": 10000i16, "float": 10000i16, "double": 10000i16 }
+{ "id": 3i64, "int8_u": {{ }}, "int8_o": [ ], "int16_u": {{ }}, "int16_o": [ ], "int32_u": {{ }}, "int32_o": [ ], "int64_u": {{ }}, "int64_o": [ ], "float_u": {{ }}, "float_o": [ ], "double_u": {{ }}, "double_o": [ ], "int8": 100i8, "int16": 10000i16, "int32": 1000000, "int64": 1000000, "float": 1000000, "double": 1000000 }
+{ "id": 4i64, "int8_u": {{ }}, "int8_o": [ ], "int16_u": {{ }}, "int16_o": [ ], "int32_u": {{ }}, "int32_o": [ ], "int64_u": {{ }}, "int64_o": [ ], "float_u": {{ }}, "float_o": [ ], "double_u": {{ }}, "double_o": [ ], "int8": 100i8, "int16": 10000i16, "int32": 1000000, "int64": 1000000, "float": 1000000, "double": 1000000 }
+{ "id": 5i64, "int8_u": {{ }}, "int8_o": [ ], "int16_u": {{ }}, "int16_o": [ ], "int32_u": {{ }}, "int32_o": [ ], "int64_u": {{ }}, "int64_o": [ ], "float_u": {{ }}, "float_o": [ ], "double_u": {{ }}, "double_o": [ ], "int8": 100i8, "int16": 10000i16, "int32": 1000000, "int64": 1410065408, "float": 1000000, "double": 1410065408 }