Issue 867: Test cases for CSV with headers and various line separators.

Change-Id: I046aa30824d14cbc894a28719c6c6560f46d0133
Reviewed-on: https://asterix-gerrit.ics.uci.edu/247
Reviewed-by: Ian Maxon <imaxon@uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Preston Carman <ecarm002@ucr.edu>
diff --git a/asterix-app/data/csv/sample_08_header.csv.cr b/asterix-app/data/csv/sample_08_header.csv.cr
new file mode 100644
index 0000000..a539b24
--- /dev/null
+++ b/asterix-app/data/csv/sample_08_header.csv.cr
@@ -0,0 +1 @@
+id,float,"double","date",time,datetime
1,0.899682764,5.6256,2013-08-07,07:22:35,1979-02-25T23:48:27.034
2,0.669052398,,-1923-03-29,19:33:34,-1979-02-25T23:48:27.002
3,0.572733058,192674,-1923-03-28,19:33:34,-1979-02-25T23:48:27.001
4,,192674,-1923-03-27,19:33:34,-1979-02-25T23:48:27.001
5,0.572733058,192674,,19:33:34,-1979-02-25T23:48:27.001
6,0.572733058,192674,-1923-03-25,,-1979-02-25T23:48:27.001
7,0.572733058,192674,-1923-03-24,19:33:34,
8,,,,,

\ No newline at end of file
diff --git a/asterix-app/data/csv/sample_08_header.csv b/asterix-app/data/csv/sample_08_header.csv.crlf
similarity index 99%
rename from asterix-app/data/csv/sample_08_header.csv
rename to asterix-app/data/csv/sample_08_header.csv.crlf
index 7444e77..168340b 100644
--- a/asterix-app/data/csv/sample_08_header.csv
+++ b/asterix-app/data/csv/sample_08_header.csv.crlf
@@ -6,4 +6,4 @@
 5,0.572733058,192674,,19:33:34,-1979-02-25T23:48:27.001
 6,0.572733058,192674,-1923-03-25,,-1979-02-25T23:48:27.001
 7,0.572733058,192674,-1923-03-24,19:33:34,
-8,,,,,
\ No newline at end of file
+8,,,,,
diff --git a/asterix-app/data/csv/sample_08_header.csv b/asterix-app/data/csv/sample_08_header.csv.lf
similarity index 99%
copy from asterix-app/data/csv/sample_08_header.csv
copy to asterix-app/data/csv/sample_08_header.csv.lf
index 7444e77..168340b 100644
--- a/asterix-app/data/csv/sample_08_header.csv
+++ b/asterix-app/data/csv/sample_08_header.csv.lf
@@ -6,4 +6,4 @@
 5,0.572733058,192674,,19:33:34,-1979-02-25T23:48:27.001
 6,0.572733058,192674,-1923-03-25,,-1979-02-25T23:48:27.001
 7,0.572733058,192674,-1923-03-24,19:33:34,
-8,,,,,
\ No newline at end of file
+8,,,,,
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.1.ddl.aql
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.1.ddl.aql
rename to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.1.ddl.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.2.update.aql
similarity index 65%
rename from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql
rename to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.2.update.aql
index e8eecf1..f6a2017 100644
--- a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.2.update.aql
@@ -9,4 +9,4 @@
 
 load dataset testds
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/csv/sample_08_header.csv"),("format"="delimited-text"),("header"="true"));
\ No newline at end of file
+(("path"="nc1://data/csv/sample_08_header.csv.cr"),("format"="delimited-text"),("header"="true"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.3.query.aql
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_cr/csv_08.3.query.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.1.ddl.aql
similarity index 100%
copy from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.1.ddl.aql
copy to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.1.ddl.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.2.update.aql
similarity index 64%
copy from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql
copy to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.2.update.aql
index e8eecf1..7634ebb 100644
--- a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.2.update.aql
@@ -9,4 +9,4 @@
 
 load dataset testds
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/csv/sample_08_header.csv"),("format"="delimited-text"),("header"="true"));
\ No newline at end of file
+(("path"="nc1://data/csv/sample_08_header.csv.crlf"),("format"="delimited-text"),("header"="true"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.3.query.aql
similarity index 100%
copy from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.3.query.aql
copy to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_crlf/csv_08.3.query.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.1.ddl.aql
similarity index 100%
copy from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.1.ddl.aql
copy to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.1.ddl.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.2.update.aql
similarity index 65%
copy from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql
copy to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.2.update.aql
index e8eecf1..4a7c203 100644
--- a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.2.update.aql
@@ -9,4 +9,4 @@
 
 load dataset testds
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/csv/sample_08_header.csv"),("format"="delimited-text"),("header"="true"));
\ No newline at end of file
+(("path"="nc1://data/csv/sample_08_header.csv.lf"),("format"="delimited-text"),("header"="true"));
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.3.query.aql
similarity index 100%
copy from asterix-app/src/test/resources/runtimets/queries/load/csv_08/csv_08.3.query.aql
copy to asterix-app/src/test/resources/runtimets/queries/load/csv_08_header_lf/csv_08.3.query.aql
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index b571514..9df6301 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -5943,7 +5943,17 @@
             </compilation-unit>
         </test-case>
         <test-case FilePath="load">
-            <compilation-unit name="csv_08">
+            <compilation-unit name="csv_08_header_cr">
+                <output-dir compare="Text">csv_08</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="load">
+            <compilation-unit name="csv_08_header_lf">
+                <output-dir compare="Text">csv_08</output-dir>
+            </compilation-unit>
+        </test-case>
+        <test-case FilePath="load">
+            <compilation-unit name="csv_08_header_crlf">
                 <output-dir compare="Text">csv_08</output-dir>
             </compilation-unit>
         </test-case>