Checkpoint #4 for fixing runtimets.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_result_distribution@1354 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/DDLAPIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/DDLAPIServlet.java
index 6e75a82..61e54d4 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/DDLAPIServlet.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/DDLAPIServlet.java
@@ -32,7 +32,7 @@
protected List<Statement.Kind> getAllowedStatements() {
Kind[] statementsArray = { Kind.DATAVERSE_DECL, Kind.DATAVERSE_DROP, Kind.DATASET_DECL, Kind.NODEGROUP_DECL,
Kind.NODEGROUP_DROP, Kind.TYPE_DECL, Kind.TYPE_DROP, Kind.CREATE_INDEX, Kind.INDEX_DECL,
- Kind.CREATE_DATAVERSE, Kind.INDEX_DROP, Kind.CREATE_FUNCTION, Kind.FUNCTION_DROP };
+ Kind.CREATE_DATAVERSE, Kind.DATASET_DROP, Kind.INDEX_DROP, Kind.CREATE_FUNCTION, Kind.FUNCTION_DROP };
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 004218f..43767a0 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
@@ -30,7 +30,7 @@
}
protected List<Statement.Kind> getAllowedStatements() {
- Kind[] statementsArray = { Kind.DATAVERSE_DECL, Kind.DATASET_DROP, Kind.DELETE, Kind.INSERT, Kind.UPDATE,
+ Kind[] statementsArray = { Kind.DATAVERSE_DECL, Kind.DELETE, Kind.INSERT, Kind.UPDATE,
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 fd7a10b..de1f208 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
@@ -155,7 +155,7 @@
// Read the response body as String.
String responseBody = method.getResponseBodyAsString();
- System.out.println(responseBody);
+ System.out.println("DDL: " + responseBody);
// Check if the method was executed successfully.
if (statusCode != HttpStatus.SC_OK) {
@@ -185,7 +185,7 @@
// Read the response body as String.
String responseBody = method.getResponseBodyAsString();
- System.out.println(responseBody);
+ System.out.println("Update: " + responseBody);
// Check if the method was executed successfully.
if (statusCode != HttpStatus.SC_OK) {
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql
index 0e5b3a0..54c65d8 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses/insert_across_dataverses.2.update.aql
@@ -7,3 +7,5 @@
insert into dataset test2.Customers(
for $x in dataset('test1.Customers')
return $x
+);
+
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 4f1c9a9..e31332f 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
@@ -1,14 +1,14 @@
use dataverse testdv2;
- insert into dataset testds (
- { "id": 1, "name": "Person One", "hobbies": {{"Rock", "Metal"}}}
- );
-
- insert into dataset testds (
- { "id": 2, "name": "Person Two", "hobbies": {{"Rock", "Jazz"}}}
- )
-
- 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": 1, "name": "Person One", "hobbies": {{"Rock", "Metal"}}}
+);
+
+insert into dataset testds (
+{ "id": 2, "name": "Person Two", "hobbies": {{"Rock", "Jazz"}}}
+)
+
+insert into dataset testds { "id": 3, "name": "Person Three", "hobbies": {{"Blues"}}};
+
+insert into dataset testds { "id": 4, "name": "Person Four", "hobbies": {{"Metal", "Jazz"}}}
diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.1.ddl.aql
index 9c0e054..326b2d5 100644
--- a/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/feeds/feeds_04/feeds_04.1.ddl.aql
@@ -21,6 +21,4 @@
using "edu.uci.ics.asterix.tools.external.data.RateControlledFileSystemBasedAdapterFactory"
(("fs"="hdfs"),("hdfs"="hdfs://127.0.0.1:31888"),("path"="/asterix/obamatweets.adm"),("format"="adm"),("input-format"="text-input-format"),("output-type-name"="TweetType"),("tuple-interval"="10"))
primary key id;
-
-begin feed TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-csx-2_5.3.1/dblp-csx-2_5.3.1.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-csx-2_5.3.1/dblp-csx-2_5.3.1.2.update.aql
index de3c8e8..916bd56 100644
--- a/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-csx-2_5.3.1/dblp-csx-2_5.3.1.2.update.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/fuzzyjoin/dblp-csx-2_5.3.1/dblp-csx-2_5.3.1.2.update.aql
@@ -1,71 +1,10 @@
use dataverse fuzzyjoin;
- //
- // -- - Stage 2 - --
- //
- for $paperDBLP in dataset('DBLP')
- let $idDBLP := $paperDBLP.id
- let $tokensUnrankedDBLP := counthashed-word-tokens($paperDBLP.title)
- let $lenDBLP := len($tokensUnrankedDBLP)
- let $tokensDBLP :=
- for $tokenUnranked in $tokensUnrankedDBLP
- for $tokenRanked at $i in
- //
- // -- - Stage 1 - --
- //
- for $paper in dataset('DBLP')
- let $id := $paper.id
- for $token in counthashed-word-tokens($paper.title)
- /*+ hash */
- group by $tokenGroupped := $token with $id
- /*+ inmem 1 302 */
- order by count($id), $tokenGroupped
- return $tokenGroupped
- where $tokenUnranked = /*+ bcast */ $tokenRanked
- order by $i
- return $i
- for $prefixTokenDBLP in subset-collection(
- $tokensDBLP,
- 0,
- prefix-len-jaccard(len($tokensDBLP), .5f))
+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 $paperCSX in dataset('CSX')
- let $idCSX := $paperCSX.id
- let $tokensUnrankedCSX := counthashed-word-tokens($paperCSX.title)
- let $lenCSX := len($tokensUnrankedCSX)
- let $tokensCSX :=
- for $tokenUnranked in $tokensUnrankedCSX
- for $tokenRanked at $i in
- //
- // -- - Stage 1 - --
- //
- for $paper in dataset('DBLP')
- let $id := $paper.id
- for $token in counthashed-word-tokens($paper.title)
- /*+ hash */
- group by $tokenGroupped := $token with $id
- /*+ inmem 1 302 */
- order by count($id), $tokenGroupped
- return $tokenGroupped
- where $tokenUnranked = /*+ bcast */ $tokenRanked
- order by $i
- return $i
- for $prefixTokenCSX in subset-collection(
- $tokensCSX,
- 0,
- prefix-len-jaccard(len($tokensCSX), .5f))
+load dataset CSX
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/pub-small/csx-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
- where $prefixTokenDBLP = $prefixTokenCSX
-
- let $sim := similarity-jaccard-prefix(
- $lenDBLP,
- $tokensDBLP,
- $lenCSX,
- $tokensCSX,
- $prefixTokenDBLP,
- .5f)
- where $sim >= .5f
- /*+ hash*/
- group by $idDBLP := $idDBLP, $idCSX := $idCSX, $sim := $sim with $sim
- order by $idDBLP, $idCSX
- return {'idDBLP': $idDBLP, 'idCSX': $idCSX, 'sim': $sim[0]}
diff --git a/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
index 34d535e..ca09806 100644
--- a/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/hints/issue_251_dataset_hint_7/issue_251_dataset_hint_7.1.ddl.aql
@@ -22,6 +22,4 @@
(("fs"="localfs"),("path"="nc1://data/twitter/obamatweets.adm"),("format"="adm"),("output-type-name"="TweetType"),("tuple-interval"="10"))
primary key id
hints(cardinality=200);
-
-begin feed feeds.TweetFeed;
diff --git a/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/uery-issue201/uery-issue201.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/query-issue201/query-issue201.1.ddl.aql
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/queries/user-defined-functions/uery-issue201/uery-issue201.1.ddl.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/query-issue201/query-issue201.1.ddl.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/uery-issue201/uery-issue201.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/query-issue201/query-issue201.2.update.aql
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/queries/user-defined-functions/uery-issue201/uery-issue201.2.update.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/query-issue201/query-issue201.2.update.aql
diff --git a/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/uery-issue201/uery-issue201.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/query-issue201/query-issue201.3.query.aql
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/queries/user-defined-functions/uery-issue201/uery-issue201.3.query.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/query-issue201/query-issue201.3.query.aql