abdullah alamoudi has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/1851
Change subject: [TEST] Test index re-creation ...................................................................... [TEST] Test index re-creation Change-Id: I96eda91a26362ca5b8f2e84b7ddc1c8272b59364 --- A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.1.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.2.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.3.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.4.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/dml/recreate-index/recreate-index.5.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/results/dml/recreate-index/recreate-index.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml 7 files changed, 183 insertions(+), 0 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/51/1851/1 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; + 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 +; 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; + 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 +; 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`; 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 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> -- To view, visit https://asterix-gerrit.ics.uci.edu/1851 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96eda91a26362ca5b8f2e84b7ddc1c8272b59364 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <bamou...@gmail.com>