checkpoint for count fix
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.1.ddl.aql
new file mode 100644
index 0000000..c0bbb1f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.1.ddl.aql
@@ -0,0 +1,10 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type Emp as open {
+id:int32,
+name:string ?
+}
+
+create dataset Employee(Emp) primary key id;
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.2.update.aql
new file mode 100644
index 0000000..fa8fb09
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.2.update.aql
@@ -0,0 +1,6 @@
+use dataverse test;
+
+insert into dataset Employee({"id":12,"name":"John Doe"});
+insert into dataset Employee({"id":42});
+insert into dataset Employee({"id":22,"name":"John Smith"});
+insert into dataset Employee({"id":19});
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.3.query.aql
new file mode 100644
index 0000000..8104319
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue395/issue395.3.query.aql
@@ -0,0 +1,4 @@
+use dataverse test;
+
+count(for $l in dataset Employee
+return $l.name)
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.1.ddl.aql
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.1.ddl.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.2.update.aql
new file mode 100644
index 0000000..c5d0395
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.2.update.aql
@@ -0,0 +1,3 @@
+issue395.1.ddl.aql
+issue395.2.update.aql
+issue395.3.query.aql
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.3.query.aql
new file mode 100644
index 0000000..9b0ed8a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/aggregate/issue412/issue412.3.query.aql
@@ -0,0 +1,2 @@
+let $l := ["ASTERIX", "Hyracks", null]
+return count($l)
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm
@@ -0,0 +1 @@
+2
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/issue412/issue412.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/issue412/issue412.1.adm
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/issue412/issue412.1.adm
@@ -0,0 +1 @@
+2
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 278d04a..e7840bd 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1,6 +1,16 @@
<test-suite xmlns="urn:xml.testframework.asterix.ics.uci.edu" ResultOffsetPath="results" QueryOffsetPath="queries" QueryFileExtension=".aql">
<test-group name="aggregate">
<test-case FilePath="aggregate">
+ <compilation-unit name="issue395">
+ <output-dir compare="Text">issue395</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
+ <compilation-unit name="issue412">
+ <output-dir compare="Text">issue412</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="aggregate">
<compilation-unit name="avg_double">
<output-dir compare="Text">avg_double</output-dir>
</compilation-unit>