asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: [TEST] Test index re-creation
Date Sat, 24 Jun 2017 06:11:48 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master d1d047b5e -> 213842050


[TEST] Test index re-creation

Change-Id: I96eda91a26362ca5b8f2e84b7ddc1c8272b59364
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1851
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Xikui Wang <xkkwww@gmail.com>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/21384205
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/21384205
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/21384205

Branch: refs/heads/master
Commit: 2138420500a0e4eb917d3e094132037a5c621a56
Parents: d1d047b
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Jun 23 18:21:26 2017 -0700
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Fri Jun 23 23:11:31 2017 -0700

----------------------------------------------------------------------
 .../recreate-index/recreate-index.1.ddl.sqlpp   | 46 ++++++++++++++++++++
 .../recreate-index.2.update.sqlpp               | 36 +++++++++++++++
 .../recreate-index/recreate-index.3.ddl.sqlpp   | 31 +++++++++++++
 .../recreate-index.4.update.sqlpp               | 33 ++++++++++++++
 .../recreate-index/recreate-index.5.query.sqlpp | 31 +++++++++++++
 .../dml/recreate-index/recreate-index.1.adm     |  1 +
 .../resources/runtimets/testsuite_sqlpp.xml     |  5 +++
 7 files changed, 183 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.1.ddl.sqlpp
new file mode 100644
index 0000000..80ef192
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.1.ddl.sqlpp
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : recreate-index
+ * Description     : This test is intended to test creating and inserting into a dataset
with an index
+ *                   then deleting the index, re-create the same index with the same name,
and then insert
+ *                   additional data
+ * Expected Result : Success
+ * Date            : June 23 2017
+ */
+
+drop  dataverse test if exists;
+create  dataverse test;
+
+use test;
+
+
+create type test.Emp as
+ closed {
+  id : bigint,
+  fname : string,
+  lname : string,
+  age : bigint,
+  dept : string
+}
+
+create  dataset test.employee(Emp) primary key id;
+
+create  index idx_employee_first_name  on test.employee (fname) type btree;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.2.update.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.2.update.sqlpp
new file mode 100644
index 0000000..08a2f88
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.2.update.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : recreate-index
+ * Description     : This test is intended to test creating and inserting into a dataset
with an index
+ *                   then deleting the index, re-create the same index with the same name,
and then insert
+ *                   additional data
+ * Expected Result : Success
+ * Date            : June 23 2017
+ */
+
+use test;
+
+
+load  dataset test.employee using localfs ((`path`=`asterix_nc1://data/names.adm`),(`format`=`delimited-text`),(`delimiter`=`|`));
+
+insert into test.employee
+select element {'id':(x.id + 10000),'fname':x.fname,'lname':x.lname,'age':x.age,'dept':x.dept}
+from  `test.employee` as x
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.3.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.3.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.3.ddl.sqlpp
new file mode 100644
index 0000000..0f86a33
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.3.ddl.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : recreate-index
+ * Description     : This test is intended to test creating and inserting into a dataset
with an index
+ *                   then deleting the index, re-create the same index with the same name,
and then insert
+ *                   additional data
+ * Expected Result : Success
+ * Date            : June 23 2017
+ */
+
+use test;
+drop index employee.idx_employee_first_name;
+create  index idx_employee_first_name  on test.employee (fname) type btree;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.4.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.4.update.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.4.update.sqlpp
new file mode 100644
index 0000000..1f89c71
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.4.update.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : recreate-index
+ * Description     : This test is intended to test creating and inserting into a dataset
with an index
+ *                   then deleting the index, re-create the same index with the same name,
and then insert
+ *                   additional data
+ * Expected Result : Success
+ * Date            : June 23 2017
+ */
+
+use test;
+
+insert into test.employee
+select element {'id':(x.id + 20000),'fname':x.fname,'lname':x.lname,'age':x.age,'dept':x.dept}
+from  `test.employee` as x
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.5.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.5.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.5.query.sqlpp
new file mode 100644
index 0000000..122ff4c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.5.query.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+/*
+ * Test case Name  : recreate-index
+ * Description     : This test is intended to test creating and inserting into a dataset
with an index
+ *                   then deleting the index, re-create the same index with the same name,
and then insert
+ *                   additional data
+ * Expected Result : Success
+ * Date            : June 23 2017
+ */
+
+use test;
+
+select element count(*)
+from  `test.employee`;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/recreate-index/recreate-index.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/recreate-index/recreate-index.1.adm
b/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/recreate-index/recreate-index.1.adm
new file mode 100644
index 0000000..7ad8022
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/dml/recreate-index/recreate-index.1.adm
@@ -0,0 +1 @@
+480
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/21384205/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 33cf582..93ba5b0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -1685,6 +1685,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="dml">
+      <compilation-unit name="recreate-index">
+        <output-dir compare="Text">recreate-index</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="dml">
       <compilation-unit name="insert-and-scan-joined-datasets">
         <output-dir compare="Text">insert-and-scan-joined-datasets</output-dir>
       </compilation-unit>


Mime
View raw message