asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: ASTERIXDB-867: add a regression test.
Date Mon, 08 Aug 2016 19:13:33 GMT
Yingyi Bu has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1055

Change subject: ASTERIXDB-867: add a regression test.
......................................................................

ASTERIXDB-867: add a regression test.

Change-Id: I84f2df6c9c6da127990c5e2e2bec67d73d33fe88
---
A asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
A asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
A asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
A asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
5 files changed, 115 insertions(+), 0 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/55/1055/1

diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
new file mode 100644
index 0000000..5b892ec
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.ddl.aql
@@ -0,0 +1,47 @@
+/*
+ * 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 test if exists;
+create dataverse test;
+use dataverse test;
+
+create type page_info_type as {
+}
+
+create type page_views_type as closed {
+  user: string,
+  action: int32,
+  timespent: int32,
+  query_term: string,
+  ip_addr: int32,
+  timestamp: int32,
+  estimated_revenue: double,
+  page_info: page_info_type,
+  page_links: {{ page_info_type}}
+}
+
+create dataset page_views(page_views_type) primary key user;
+
+create type incr_id_type as closed {
+  id: uuid,
+  user: string,
+  header: string?
+}
+
+create dataset by_actions(incr_id_type) primary key id autogenerated;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
new file mode 100644
index 0000000..577d504
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.2.update.aql
@@ -0,0 +1,34 @@
+/*
+ * 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 dataverse test;
+
+load dataset page_views using localfs
+(("path"="asterix_nc1://data/page_views.adm"),("format"="adm"));
+
+insert into dataset by_actions (
+  for $t in dataset page_views
+  where ($t.action = 1)
+  return
+  { "user": $t.user, "header": $t.page_info.a }
+);
+
+insert into dataset by_actions (
+  {"user": "kereno", "header": "zzz"}
+);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
new file mode 100644
index 0000000..87524e0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.3.query.aql
@@ -0,0 +1,27 @@
+/*
+ * 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 dataverse test;
+
+for $t in dataset by_actions
+order by $t.user
+return {
+  "user": $t.user,
+  "header": $t.header
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
new file mode 100644
index 0000000..6f83fec
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/query-ASTERIXDB-867/query-ASTERIXDB-867.1.adm
@@ -0,0 +1,2 @@
+{ "user": "John", "header": "aaa" }
+{ "user": "kereno", "header": "zzz" }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
index f410cbe..6e9e7ab 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1934,6 +1934,11 @@
         <output-dir compare="Text">delete-multi-statement</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="dml">
+      <compilation-unit name="query-ASTERIXDB-867">
+        <output-dir compare="Text">query-ASTERIXDB-867</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="employee">
     <test-case FilePath="employee">

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1055
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84f2df6c9c6da127990c5e2e2bec67d73d33fe88
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu <buyingyi@gmail.com>

Mime
View raw message