Checkpoint #3 for fixing runtimets.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_result_distribution@1353 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/QueryAPIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/QueryAPIServlet.java
index 32d388b..79eb035 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/QueryAPIServlet.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/QueryAPIServlet.java
@@ -30,8 +30,7 @@
}
protected List<Statement.Kind> getAllowedStatements() {
- Kind[] statementsArray = { Kind.DATAVERSE_DECL, Kind.FUNCTION_DECL, Kind.QUERY, Kind.SET, Kind.WRITE,
- Kind.BEGIN_FEED, Kind.CONTROL_FEED };
+ Kind[] statementsArray = { Kind.DATAVERSE_DECL, Kind.FUNCTION_DECL, Kind.QUERY, Kind.SET, Kind.WRITE };
return Arrays.asList(statementsArray);
}
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/UpdateAPIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/UpdateAPIServlet.java
index f448c22..004218f 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/UpdateAPIServlet.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/UpdateAPIServlet.java
@@ -31,7 +31,8 @@
protected List<Statement.Kind> getAllowedStatements() {
Kind[] statementsArray = { Kind.DATAVERSE_DECL, Kind.DATASET_DROP, Kind.DELETE, Kind.INSERT, Kind.UPDATE,
- Kind.DML_CMD_LIST, Kind.LOAD_FROM_FILE, Kind.WRITE_FROM_QUERY_RESULT };
+ Kind.DML_CMD_LIST, Kind.LOAD_FROM_FILE, Kind.WRITE_FROM_QUERY_RESULT, Kind.BEGIN_FEED,
+ Kind.CONTROL_FEED };
return Arrays.asList(statementsArray);
}
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
index c1d7666..fd7a10b 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
@@ -33,6 +33,7 @@
import edu.uci.ics.asterix.testframework.context.TestCaseContext;
import edu.uci.ics.asterix.testframework.context.TestFileContext;
import edu.uci.ics.asterix.testframework.xml.TestCase.CompilationUnit;
+import edu.uci.ics.hyracks.algebricks.core.config.SysoutFormatter;
/**
* Runs the runtime test cases under 'asterix-app/src/test/resources/runtimets'.
@@ -193,7 +194,7 @@
}
// Executes Query and returns results as JSONArray
- public JSONArray executeQuery(String str) throws Exception {
+ public JSONObject executeQuery(String str) throws Exception {
final String url = "http://localhost:19101/query";
@@ -208,7 +209,7 @@
// Provide custom retry handler is necessary
method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
- JSONArray jArray = null;
+ JSONObject result = null;
try {
// Execute the method.
@@ -224,14 +225,12 @@
System.out.println(responseBody);
- JSONObject jsonObj = new JSONObject(responseBody);
-
- jArray = jsonObj.getJSONArray("results");
+ result = new JSONObject(responseBody);
} catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
- return jArray;
+ return result;
}
@Test
@@ -244,7 +243,7 @@
String statement;
int queryCount = 0;
- JSONArray resultsArray;
+ JSONObject result;
List<CompilationUnit> cUnits = tcCtx.getTestCase().getCompilationUnit();
for (CompilationUnit cUnit : cUnits) {
@@ -263,12 +262,20 @@
executeUpdate(statement);
break;
case "query":
- resultsArray = executeQuery(statement);
- expectedResultFile = expectedResultFileCtxs.get(queryCount).getFile();
+ result = executeQuery(statement);
+ if (!cUnit.getExpectedError().isEmpty()) {
+ if (!result.has("error")) {
+ throw new Exception("Test \"" + testFile + "\" FAILED!");
+ }
+ } else {
+ expectedResultFile = expectedResultFileCtxs.get(queryCount).getFile();
+ TestsUtils
+ .runScriptAndCompareWithResult(
+ AsterixHyracksIntegrationUtil.getHyracksClientConnection(), testFile,
+ new PrintWriter(System.err), expectedResultFile,
+ result.getJSONArray("results"));
+ }
queryCount++;
- TestsUtils.runScriptAndCompareWithResult(
- AsterixHyracksIntegrationUtil.getHyracksClientConnection(), testFile,
- new PrintWriter(System.err), expectedResultFile, resultsArray);
break;
default:
throw new IllegalArgumentException("No statements of type " + ctx.getType());
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql
new file mode 100644
index 0000000..02cf244
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.1.ddl.aql
@@ -0,0 +1,35 @@
+/*
+ * 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;
+
+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;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql
new file mode 100644
index 0000000..9236626
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.2.update.aql
@@ -0,0 +1,8 @@
+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"});
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql
new file mode 100644
index 0000000..f8933d6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv20/cross-dv20.3.query.aql
@@ -0,0 +1,5 @@
+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/delete-syntax-change.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/dml/delete-syntax-change/delete-syntax-change.2.update.aql
index e1f534a..06c0e6e 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/delete-syntax-change/delete-syntax-change.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/delete-syntax-change/delete-syntax-change.2.update.aql
@@ -4,5 +4,5 @@
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
+delete $l from dataset LineItem where $l.l_orderkey>=10;
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax/insert-syntax.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax/insert-syntax.2.update.aql
index e272b59..4f1c9a9 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax/insert-syntax.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/insert-syntax/insert-syntax.2.update.aql
@@ -10,5 +10,5 @@
insert into dataset testds { "id": 3, "name": "Person Three", "hobbies": {{"Blues"}}};
- insert into dataset testds { "id": 4, "name": "Person Four", "hobbies": {{"Metal", "Jazz"}}}
+ insert into dataset testds { "id": 4, "name": "Person Four", "hobbies": {{"Metal", "Jazz"}}};
diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
index 0965cbd..aafd2c9 100644
--- a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.1.ddl.aql
@@ -21,6 +21,5 @@
using "edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFactory"
(("fs"="localfs"),("path"="nc1://data/twitter/obamatweets.adm"),("format"="adm"),("output-type-name"="TweetType"),("tuple-interval"="10"))
primary key id;
-
-begin feed TweetFeed;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.2.update.aql
index a3c7fd0..01b0925 100644
--- a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_02/feeds_02.2.update.aql
@@ -5,4 +5,6 @@
* Date : 24th Dec 2012
*/
-
+use dataverse feeds;
+
+begin feed TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.2.update.aql
index 0b50cbb..060576e 100644
--- a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.2.update.aql
@@ -5,4 +5,7 @@
* Expected Res : Success
* Date : 24th Dec 2012
*/
+
+use dataverse feeds;
+begin feed TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
index 39e9e08..62ac61f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.1.ddl.aql
@@ -20,6 +20,4 @@
using "edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFactory"
(("fs"="localfs"),("path"="nc1://data/twitter/obamatweets.adm"),("format"="adm"),("output-type-name"="TweetType"),("tuple-interval"="10"))
primary key id;
-
-begin feed feeds.TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.2.update.aql
index a41302b..0e22d6e 100644
--- a/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/feeds/issue_230_feeds/issue_230_feeds.2.update.aql
@@ -5,3 +5,6 @@
* Date : 24th Dec 2012
*/
+use dataverse feeds;
+
+begin feed feeds.TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.1.ddl.aql
index 020f37c..239399f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.1.ddl.aql
@@ -14,7 +14,4 @@
create dataset DBLP(DBLPType) primary key id;
-load dataset DBLP
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/pub-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.3.query.aql
index 308608e..3557162 100644
--- a/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-lookup_1/dblp-lookup_1.3.query.aql
@@ -1,6 +1,6 @@
use dataverse fuzzyjoin;
-load dataset DBLP
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/pub-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
+for $paper in dataset('DBLP')
+where $paper.id = 1
+return $paper
diff --git a/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.2.update.aql
index 7f4b2a3..7851440 100644
--- a/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.2.update.aql
@@ -6,3 +6,6 @@
* Date : 30th Jan 2013
*/
+use dataverse feeds;
+
+begin feed feeds.TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.1.ddl.aql
index c761611..8c1dcf7 100644
--- a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.1.ddl.aql
@@ -28,4 +28,3 @@
create dataset Customers2(CustomerType) primary key cid;
-create index ngram_index on Customers(name) type ngram(3);
diff --git a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.ddl.aql
similarity index 64%
copy from asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.query.aql
copy to asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.ddl.aql
index 19c780b..e7a958e 100644
--- a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.ddl.aql
@@ -5,12 +5,6 @@
* Success : Yes
*/
-drop dataverse test if exists;
-create dataverse test;
use dataverse test;
-for $a in dataset('Customers')
-for $b in dataset('Customers2')
-where edit-distance($a.name, $b.name) <= 4 and $a.cid < $b.cid
-order by $a.cid, $b.cid
-return { "a": $a.name, "b": $b.name }
+create index ngram_index on Customers(name) type ngram(3);
diff --git a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.4.query.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.4.query.aql
index 19c780b..f7389e8 100644
--- a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ngram-edit-distance/ngram-edit-distance.4.query.aql
@@ -5,8 +5,6 @@
* Success : Yes
*/
-drop dataverse test if exists;
-create dataverse test;
use dataverse test;
for $a in dataset('Customers')
diff --git a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql
index e39bb31..30cfdec 100644
--- a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql
@@ -14,5 +14,4 @@
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm"));
-create index ngram_index on Customers(name) type ngram(3);
diff --git a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql
new file mode 100644
index 0000000..e4c62b1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql
@@ -0,0 +1,3 @@
+use dataverse test;
+
+create index ngram_index on Customers(name) type ngram(3);
diff --git a/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.4.query.aql
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.4.query.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.1.ddl.aql
index 2b0ed38..4a5848c 100644
--- a/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.1.ddl.aql
@@ -11,3 +11,6 @@
text: string
}
+create external dataset TwitterData(Tweet)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/twitter/extrasmalltweets.txt"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.2.update.aql
index a2b6898..e69de29 100644
--- a/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/misc/groupby-orderby-count/groupby-orderby-count.2.update.aql
@@ -1,6 +0,0 @@
-use dataverse twitter;
-
-create external dataset TwitterData(Tweet)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/twitter/extrasmalltweets.txt"),("format"="adm"));
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/30/30.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/30/30.1.ddl.aql
index d3e3cdc..d94e08c 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/30/30.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/30/30.1.ddl.aql
@@ -12,3 +12,6 @@
misc: string
}
+create external dataset DBLPsplits(DBLPType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/dblp-small/dblp-small.adm"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/30/30.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/30/30.2.update.aql
index 282854a..a8cceb7 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/30/30.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/30/30.2.update.aql
@@ -1,6 +1,2 @@
/* scan and print 2 ADM file splits as an external dataset of closed records */
-use dataverse test;
-create external dataset DBLPsplits(DBLPType)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/dblp-small/dblp-small.adm"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.1.ddl.aql
index de9d1a4..67e79fe 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.1.ddl.aql
@@ -32,3 +32,6 @@
// union
}
+create external dataset All(AllType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/allData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.2.update.aql
index 4d744c9..e69de29 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_01/alltypes_01.2.update.aql
@@ -1,5 +0,0 @@
-use dataverse test;
-
-create external dataset All(AllType)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/nontagged/allData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.1.ddl.aql
index c582792..8e27049 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.1.ddl.aql
@@ -39,3 +39,6 @@
// union
}
+create external dataset All(AllType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/allData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.2.update.aql
index 01c8d9e..67af24b 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.2.update.aql
@@ -5,8 +5,3 @@
* Date : 6th March 2013
*/
-use dataverse test;
-
-create external dataset All(AllType)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/nontagged/allData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.3.query.aql
index 866a6e3..6402144 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.3.query.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/alltypes_02/alltypes_02.3.query.aql
@@ -8,5 +8,4 @@
use dataverse test;
for $a in dataset All
-return $a
-
+return $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.1.ddl.aql
index fdfb40a..658bf5b 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.1.ddl.aql
@@ -13,3 +13,6 @@
doubleField: double?
}
+create external dataset Numeric(NumericType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/numericData.adm"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.2.update.aql
index d397e68..e69de29 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/numeric_types_01/numeric_types_01.2.update.aql
@@ -1,6 +0,0 @@
-use dataverse test;
-
-create external dataset Numeric(NumericType)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/nontagged/numericData.adm"),("format"="adm"));
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.1.ddl.aql
index de16361..73a4517 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.1.ddl.aql
@@ -12,3 +12,6 @@
circle: circle
}
+create external dataset Spatial(SpatialType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/spatialData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.2.update.aql
index 08bbb46..d415c73 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_01/spatial_types_01.2.update.aql
@@ -1,6 +1,2 @@
use dataverse test;
-create external dataset Spatial(SpatialType)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/nontagged/spatialData.json"),("format"="adm"));
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.1.ddl.aql
index cf87ca5..1dc7c86 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.1.ddl.aql
@@ -15,3 +15,6 @@
create dataset Spatial2(SpatialType)
primary key id;
+load dataset Spatial2
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/spatialData.txt"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.2.update.aql
index d631c4d..e69de29 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/spatial_types_02/spatial_types_02.2.update.aql
@@ -1,6 +0,0 @@
-use dataverse test;
-
-load dataset Spatial2
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/nontagged/spatialData.txt"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
-
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.1.ddl.aql
index d22d699..f73c49a 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.1.ddl.aql
@@ -11,3 +11,6 @@
duration: duration
}
+create external dataset Temp(TempType)
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/nontagged/tempData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.2.update.aql
index d279fc4..e69de29 100644
--- a/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/scan/temp_types_01/temp_types_01.2.update.aql
@@ -1,5 +0,0 @@
-use dataverse test;
-
-create external dataset Temp(TempType)
-using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
-(("path"="nc1://data/nontagged/tempData.json"),("format"="adm"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/strlen03/strlen03.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/string/strlen03/strlen03.1.ddl.aql
index 9f8d0e8..f2a0456 100644
--- a/asterix-app/src/test/resources/runtimets/queries/string/strlen03/strlen03.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/string/strlen03/strlen03.1.ddl.aql
@@ -10,6 +10,8 @@
drop dataverse test if exists;
create dataverse test;
+use dataverse test;
+
create type TestType as {
name:string
}
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv20/cross-dv20.1.adm b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv20/cross-dv20.1.adm
new file mode 100644
index 0000000..e6cbca6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv20/cross-dv20.1.adm
@@ -0,0 +1,2 @@
+{ "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/cross-dataverse/rop_dataset/rop_dataset.1.adm b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/drop_dataset/drop_dataset.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/rop_dataset/rop_dataset.1.adm
rename to asterix-app/src/test/resources/runtimets/results/cross-dataverse/drop_dataset/drop_dataset.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/etadata_dataset/etadata_dataset.1.adm b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/metadata_dataset/metadata_dataset.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/etadata_dataset/etadata_dataset.1.adm
rename to asterix-app/src/test/resources/runtimets/results/cross-dataverse/metadata_dataset/metadata_dataset.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ngram-jaccar/inverted-index-ngram-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ngram-jaccar/inverted-index-ngram-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-olist-jaccar/inverted-index-olist-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-olist-jaccard/inverted-index-olist-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-olist-jaccar/inverted-index-olist-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-olist-jaccard/inverted-index-olist-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ulist-jaccar/inverted-index-ulist-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ulist-jaccar/inverted-index-ulist-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-word-jaccar/inverted-index-word-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-word-jaccard/inverted-index-word-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-word-jaccar/inverted-index-word-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/index-selection/inverted-index-word-jaccard/inverted-index-word-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ngram-jaccar/ngram-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ngram-jaccard/ngram-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ngram-jaccar/ngram-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ngram-jaccard/ngram-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ulist-jaccar/ulist-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ulist-jaccar/ulist-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/word-jaccar/word-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/word-jaccar/word-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/nestrecords/nestrecor/nestrecor.1.adm b/asterix-app/src/test/resources/runtimets/results/nestrecords/nestrecord/nestrecord.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/nestrecords/nestrecor/nestrecor.1.adm
rename to asterix-app/src/test/resources/runtimets/results/nestrecords/nestrecord/nestrecord.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/records/field-access-on-open-fiel/field-access-on-open-fiel.1.adm b/asterix-app/src/test/resources/runtimets/results/records/field-access-on-open-field/field-access-on-open-field.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/records/field-access-on-open-fiel/field-access-on-open-fiel.1.adm
rename to asterix-app/src/test/resources/runtimets/results/records/field-access-on-open-field/field-access-on-open-field.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/similarity/fuzzyeq-similarity-jaccar/fuzzyeq-similarity-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/similarity/fuzzyeq-similarity-jaccard/fuzzyeq-similarity-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/similarity/fuzzyeq-similarity-jaccar/fuzzyeq-similarity-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/similarity/fuzzyeq-similarity-jaccard/fuzzyeq-similarity-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/similarity/prefix-len-jaccar/prefix-len-jaccar.1.adm b/asterix-app/src/test/resources/runtimets/results/similarity/prefix-len-jaccard/prefix-len-jaccard.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/similarity/prefix-len-jaccar/prefix-len-jaccar.1.adm
rename to asterix-app/src/test/resources/runtimets/results/similarity/prefix-len-jaccard/prefix-len-jaccard.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/spatial/istance-between-points/istance-between-points.1.adm b/asterix-app/src/test/resources/runtimets/results/spatial/distance-between-points/distance-between-points.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/spatial/istance-between-points/istance-between-points.1.adm
rename to asterix-app/src/test/resources/runtimets/results/spatial/distance-between-points/distance-between-points.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/spatial/spatial-are/spatial-are.1.adm b/asterix-app/src/test/resources/runtimets/results/spatial/spatial-area/spatial-area.1.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/spatial/spatial-are/spatial-are.1.adm
rename to asterix-app/src/test/resources/runtimets/results/spatial/spatial-area/spatial-area.1.adm
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 534e919..d8f9bbb 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1498,8 +1498,7 @@
<output-dir compare="Text">dblp-aqlplus_1</output-dir>
</compilation-unit>
</test-case>
-<!-- TODO(madhusudancs)
- <test-case FilePath="fuzzyjoin">
+<!-- TODO(madhusudancs) <test-case FilePath="fuzzyjoin">
<compilation-unit name="dblp-aqlplus_2">
<output-dir compare="Text">dblp-aqlplus_2</output-dir>
<expected-error>edu.uci.ics.asterix.common.exceptions.AsterixException</expected-error>
diff --git a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
index a1f302b..0e2c7a2 100644
--- a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
+++ b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
@@ -78,14 +78,16 @@
String fileNames[] = path.list();
System.out.println("Path: " + path.toString());
- for (String fName : fileNames) {
- File testFile = new File(path, fName);
- TestFileContext tfsc = new TestFileContext(testFile);
- String[] nameSplits = fName.split("\\.");
- tfsc.setSeqNum(nameSplits[nameSplits.length - 2]);
- resultFileCtxs.add(tfsc);
+ if (fileNames != null) {
+ for (String fName : fileNames) {
+ File testFile = new File(path, fName);
+ TestFileContext tfsc = new TestFileContext(testFile);
+ String[] nameSplits = fName.split("\\.");
+ tfsc.setSeqNum(nameSplits[nameSplits.length - 2]);
+ resultFileCtxs.add(tfsc);
+ }
+ Collections.sort(resultFileCtxs);
}
- Collections.sort(resultFileCtxs);
return resultFileCtxs;
}