[ASTERIXDB-3429][TEST] Add csv-spectrum test suite
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Add tests using the csv-spectrum suite to validate
the CSV parser's behavior
Change-Id: I50bebc4b8b683889855cb5dd048ab27d7c93af77
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18386
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/comma_in_quotes.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/comma_in_quotes.csv
new file mode 100644
index 0000000..2aed6c1
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/comma_in_quotes.csv
@@ -0,0 +1,2 @@
+first,last,address,city,zip
+John,Doe,120 any st.,"Anytown, WW",08123
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/empty.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/empty.csv
new file mode 100644
index 0000000..7fc5cfa
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/empty.csv
@@ -0,0 +1,3 @@
+a,b,c
+1,"",""
+2,3,4
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/empty_crlf.csv.crlf b/asterixdb/asterix-app/data/csv-spectrum/csvs/empty_crlf.csv.crlf
new file mode 100644
index 0000000..7fc5cfa
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/empty_crlf.csv.crlf
@@ -0,0 +1,3 @@
+a,b,c
+1,"",""
+2,3,4
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/escaped_quotes.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/escaped_quotes.csv
new file mode 100644
index 0000000..d4a05cb
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/escaped_quotes.csv
@@ -0,0 +1,3 @@
+a,b
+1,"ha ""ha"" ha"
+3,4
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/json.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/json.csv
new file mode 100644
index 0000000..f2c2812
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/json.csv
@@ -0,0 +1,2 @@
+key,val
+1,"{""type"": ""Point"", ""coordinates"": [102.0, 0.5]}"
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/newlines.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/newlines.csv
new file mode 100644
index 0000000..e034f33
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/newlines.csv
@@ -0,0 +1,5 @@
+a,b,c
+1,2,3
+"Once upon
+a time",5,6
+7,8,9
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/newlines_crlf.csv.crlf b/asterixdb/asterix-app/data/csv-spectrum/csvs/newlines_crlf.csv.crlf
new file mode 100644
index 0000000..e034f33
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/newlines_crlf.csv.crlf
@@ -0,0 +1,5 @@
+a,b,c
+1,2,3
+"Once upon
+a time",5,6
+7,8,9
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/quotes_and_newlines.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/quotes_and_newlines.csv
new file mode 100644
index 0000000..0d911b8
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/quotes_and_newlines.csv
@@ -0,0 +1,5 @@
+a,b
+1,"ha
+""ha""
+ha"
+3,4
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/simple.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/simple.csv
new file mode 100644
index 0000000..bfde6bf
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/simple.csv
@@ -0,0 +1,2 @@
+a,b,c
+1,2,3
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/simple_crlf.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/simple_crlf.csv
new file mode 100644
index 0000000..bfde6bf
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/simple_crlf.csv
@@ -0,0 +1,2 @@
+a,b,c
+1,2,3
diff --git a/asterixdb/asterix-app/data/csv-spectrum/csvs/utf8.csv b/asterixdb/asterix-app/data/csv-spectrum/csvs/utf8.csv
new file mode 100644
index 0000000..4504964
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/csvs/utf8.csv
@@ -0,0 +1,3 @@
+a,b,c
+1,2,3
+4,5,ʤ
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/comma_in_quotes.json b/asterixdb/asterix-app/data/csv-spectrum/json/comma_in_quotes.json
new file mode 100644
index 0000000..91f3297
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/comma_in_quotes.json
@@ -0,0 +1,9 @@
+[
+ {
+ "first": "John",
+ "last": "Doe",
+ "address": "120 any st.",
+ "city": "Anytown, WW",
+ "zip": "08123"
+ }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/empty.json b/asterixdb/asterix-app/data/csv-spectrum/json/empty.json
new file mode 100644
index 0000000..c9a079d
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/empty.json
@@ -0,0 +1,4 @@
+[
+ { "a": "1", "b": "", "c": "" },
+ { "a": "2", "b": "3", "c": "4" }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/empty_crlf.json b/asterixdb/asterix-app/data/csv-spectrum/json/empty_crlf.json
new file mode 100644
index 0000000..c9a079d
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/empty_crlf.json
@@ -0,0 +1,4 @@
+[
+ { "a": "1", "b": "", "c": "" },
+ { "a": "2", "b": "3", "c": "4" }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/escaped_quotes.json b/asterixdb/asterix-app/data/csv-spectrum/json/escaped_quotes.json
new file mode 100644
index 0000000..bfc19b2
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/escaped_quotes.json
@@ -0,0 +1,10 @@
+[
+ {
+ "a": "1",
+ "b": "ha \"ha\" ha"
+ },
+ {
+ "a": "3",
+ "b": "4"
+ }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/json.json b/asterixdb/asterix-app/data/csv-spectrum/json/json.json
new file mode 100644
index 0000000..72f21d2
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/json.json
@@ -0,0 +1,6 @@
+[
+ {
+ "key": "1",
+ "val": "{\"type\": \"Point\", \"coordinates\": [102.0, 0.5]}"
+ }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/newlines.json b/asterixdb/asterix-app/data/csv-spectrum/json/newlines.json
new file mode 100644
index 0000000..cb71f1a
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/newlines.json
@@ -0,0 +1,17 @@
+[
+ {
+ "a": "1",
+ "b": "2",
+ "c": "3"
+ },
+ {
+ "a": "Once upon \na time",
+ "b": "5",
+ "c": "6"
+ },
+ {
+ "a": "7",
+ "b": "8",
+ "c": "9"
+ }
+]
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/newlines_crlf.json b/asterixdb/asterix-app/data/csv-spectrum/json/newlines_crlf.json
new file mode 100644
index 0000000..bf13113
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/newlines_crlf.json
@@ -0,0 +1,17 @@
+[
+ {
+ "a": "1",
+ "b": "2",
+ "c": "3"
+ },
+ {
+ "a": "Once upon \r\na time",
+ "b": "5",
+ "c": "6"
+ },
+ {
+ "a": "7",
+ "b": "8",
+ "c": "9"
+ }
+]
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/quotes_and_newlines.json b/asterixdb/asterix-app/data/csv-spectrum/json/quotes_and_newlines.json
new file mode 100644
index 0000000..160bd3a
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/quotes_and_newlines.json
@@ -0,0 +1,10 @@
+[
+ {
+ "a": "1",
+ "b": "ha \n\"ha\" \nha"
+ },
+ {
+ "a": "3",
+ "b": "4"
+ }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/simple.json b/asterixdb/asterix-app/data/csv-spectrum/json/simple.json
new file mode 100644
index 0000000..e44a0f7
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/simple.json
@@ -0,0 +1,7 @@
+[
+ {
+ "a": "1",
+ "b": "2",
+ "c": "3"
+ }
+]
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/simple_crlf.json b/asterixdb/asterix-app/data/csv-spectrum/json/simple_crlf.json
new file mode 100644
index 0000000..1381377
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/simple_crlf.json
@@ -0,0 +1,7 @@
+[
+ {
+ "a": "1",
+ "b": "2",
+ "c": "3"
+ }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/data/csv-spectrum/json/utf8.json b/asterixdb/asterix-app/data/csv-spectrum/json/utf8.json
new file mode 100644
index 0000000..8ced204
--- /dev/null
+++ b/asterixdb/asterix-app/data/csv-spectrum/json/utf8.json
@@ -0,0 +1,12 @@
+[
+ {
+ "a": "1",
+ "b": "2",
+ "c": "3"
+ },
+ {
+ "a": "4",
+ "b": "5",
+ "c": "ʤ"
+ }
+]
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.1.ddl.sqlpp
new file mode 100644
index 0000000..a39d61b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { first: string, last: string, address: string, city: string, zip: string};
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/comma_in_quotes.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/comma_in_quotes.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/comma_in_quotes/comma_in_quotes.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.1.ddl.sqlpp
new file mode 100644
index 0000000..1dbb61d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/empty.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/empty.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty/empty.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.1.ddl.sqlpp
new file mode 100644
index 0000000..f72e08e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/empty_crlf.csv.crlf"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/empty_crlf.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/empty_crlf/empty_crlf.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.1.ddl.sqlpp
new file mode 100644
index 0000000..11e3d84
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string};
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/escaped_quotes.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/escaped_quotes.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/escaped_quotes/escaped_quotes.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.1.ddl.sqlpp
new file mode 100644
index 0000000..bf12932
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { `key`: string, val: string};
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/json.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/json.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/json/json.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.1.ddl.sqlpp
new file mode 100644
index 0000000..6d68d85
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/newlines.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/newlines.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines/newlines.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.1.ddl.sqlpp
new file mode 100644
index 0000000..bbba8ac
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/newlines_crlf.csv.crlf"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/newlines_crlf.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/newlines_crlf/newlines_crlf.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.1.ddl.sqlpp
new file mode 100644
index 0000000..611c621
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string};
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/quotes_and_newlines.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/quotes_and_newlines.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/quotes_and_newlines/quotes_and_newlines.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.1.ddl.sqlpp
new file mode 100644
index 0000000..71d0864
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/simple.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/simple.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple/simple.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.1.ddl.sqlpp
new file mode 100644
index 0000000..48463af9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/simple_crlf.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/simple_crlf.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/simple_crlf/simple_crlf.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.1.ddl.sqlpp
new file mode 100644
index 0000000..b26e514
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ *
+ * CSV file loading test
+ * Expected result: success
+ * Row with a comma in a quoted field
+ *
+ */
+
+drop dataverse temp if exists;
+create dataverse temp;
+
+use temp;
+
+create type t1 as closed { a: string, b: string, c:string };
+create external dataset csvSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/csvs/utf8.csv"),("format"="csv"),("header"="true"));
+create external dataset jsonSide(t1) using localfs (("path"="asterix_nc1://data/csv-spectrum/json/utf8.json"),("format"="json"));
+
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.2.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.2.query.sqlpp
new file mode 100644
index 0000000..ce46e0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.2.query.sqlpp
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use temp;
+SELECT COUNT(*)
+FROM jsonSide j, csvSide c
+WHERE c = j;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.99.ddl.sqlpp
new file mode 100644
index 0000000..628adaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/csv-spectrum/utf8/utf8.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+drop dataverse temp if exists;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/comma_in_quotes/comma_in_quotes.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/comma_in_quotes/comma_in_quotes.1.adm
new file mode 100644
index 0000000..7cc3573
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/comma_in_quotes/comma_in_quotes.1.adm
@@ -0,0 +1 @@
+{ "$1": 1 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/empty/empty.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/empty/empty.1.adm
new file mode 100644
index 0000000..a5593dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/empty/empty.1.adm
@@ -0,0 +1 @@
+{ "$1": 2 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/empty_crlf/empty_crlf.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/empty_crlf/empty_crlf.1.adm
new file mode 100644
index 0000000..a5593dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/empty_crlf/empty_crlf.1.adm
@@ -0,0 +1 @@
+{ "$1": 2 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/escaped_quotes/escaped_quotes.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/escaped_quotes/escaped_quotes.1.adm
new file mode 100644
index 0000000..a5593dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/escaped_quotes/escaped_quotes.1.adm
@@ -0,0 +1 @@
+{ "$1": 2 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/json/json.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/json/json.1.adm
new file mode 100644
index 0000000..7cc3573
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/json/json.1.adm
@@ -0,0 +1 @@
+{ "$1": 1 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/newlines/newlines.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/newlines/newlines.1.adm
new file mode 100644
index 0000000..e8c8fd2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/newlines/newlines.1.adm
@@ -0,0 +1 @@
+{ "$1": 3 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/newlines_crlf/newlines_crlf.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/newlines_crlf/newlines_crlf.1.adm
new file mode 100644
index 0000000..e8c8fd2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/newlines_crlf/newlines_crlf.1.adm
@@ -0,0 +1 @@
+{ "$1": 3 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/quotes_and_newlines/quotes_and_newlines.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/quotes_and_newlines/quotes_and_newlines.1.adm
new file mode 100644
index 0000000..a5593dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/quotes_and_newlines/quotes_and_newlines.1.adm
@@ -0,0 +1 @@
+{ "$1": 2 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/simple/simple.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/simple/simple.1.adm
new file mode 100644
index 0000000..7cc3573
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/simple/simple.1.adm
@@ -0,0 +1 @@
+{ "$1": 1 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/simple_crlf/simple_crlf.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/simple_crlf/simple_crlf.1.adm
new file mode 100644
index 0000000..7cc3573
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/simple_crlf/simple_crlf.1.adm
@@ -0,0 +1 @@
+{ "$1": 1 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/utf8/utf8.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/utf8/utf8.1.adm
new file mode 100644
index 0000000..a5593dc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/csv-spectrum/utf8/utf8.1.adm
@@ -0,0 +1 @@
+{ "$1": 2 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
index 8abe46c..d476c25 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
@@ -13821,6 +13821,61 @@
<output-dir compare="Text">csv_08</output-dir>
</compilation-unit>
</test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="comma_in_quotes">
+ <output-dir compare="Text">comma_in_quotes</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="empty">
+ <output-dir compare="Text">empty</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="empty_crlf">
+ <output-dir compare="Text">empty_crlf</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="escaped_quotes">
+ <output-dir compare="Text">escaped_quotes</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="json">
+ <output-dir compare="Text">json</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="newlines">
+ <output-dir compare="Text">newlines</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="newlines_crlf">
+ <output-dir compare="Text">newlines_crlf</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="quotes_and_newlines">
+ <output-dir compare="Text">quotes_and_newlines</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="simple">
+ <output-dir compare="Text">simple</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="simple_crlf">
+ <output-dir compare="Text">simple_crlf</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="csv-spectrum">
+ <compilation-unit name="utf8">
+ <output-dir compare="Text">utf8</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>
diff --git a/asterixdb/src/main/licenses/templates/source_only_licenses.ftl b/asterixdb/src/main/licenses/templates/source_only_licenses.ftl
index 9abaf93..4ee65da 100644
--- a/asterixdb/src/main/licenses/templates/source_only_licenses.ftl
+++ b/asterixdb/src/main/licenses/templates/source_only_licenses.ftl
@@ -184,3 +184,17 @@
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
</@license>
+<@license files=["asterix-app/data/csv-spectrum/*"]
+ component="AsterixDB csv-spectrum tests" licenseName="BSD">
+Copyright (c) 2013, Max Ogden
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</@license>
+
+
+