This is an automated email from the ASF dual-hosted git repository. htowaileb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 0f407d9224c92a2a5d571dcd53873da9c287021f Author: Hussain Towaileb <[email protected]> AuthorDate: Fri May 15 14:10:53 2020 +0300 [ASTERIXDB-2725][COMP] Check if dataverse exists before continuing the DDL execution - user model changes: no - storage format changes: no - interface changes: no Details: - Added dataverse check at multiple places before proceeding with the execution of the DDL. - Added a test cases for each newly added check. Change-Id: I8d54b0b10741d65df91cbb4b7596d363f7ddbd97 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6203 Integration-Tests: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Dmitry Lychagin <[email protected]> --- .../asterix/app/translator/QueryTranslator.java | 25 +++++++++++++++++ .../dataset-and-index-same-dataverse.000.ddl.sqlpp | 32 ++++++++++++++++++++++ ...ataset-and-index-same-dataverse.001.query.sqlpp | 24 ++++++++++++++++ .../dataset-and-index-same-dataverse.999.ddl.sqlpp | 21 ++++++++++++++ .../invalid-dataverse.001.ddl.sqlpp | 21 ++++++++++++++ .../invalid-dataverse.002.ddl.sqlpp | 26 ++++++++++++++++++ .../invalid-dataverse.003.ddl.sqlpp | 28 +++++++++++++++++++ .../invalid-dataverse.004.ddl.sqlpp | 29 ++++++++++++++++++++ .../invalid-dataverse.005.ddl.sqlpp | 29 ++++++++++++++++++++ .../invalid-dataverse.006.ddl.sqlpp | 29 ++++++++++++++++++++ .../invalid-dataverse.007.ddl.sqlpp | 29 ++++++++++++++++++++ .../invalid-dataverse.008.ddl.sqlpp | 31 +++++++++++++++++++++ .../invalid-dataverse.099.ddl.sqlpp | 21 ++++++++++++++ .../dataset-and-index-same-dataverse.001.adm | 1 + .../test/resources/runtimets/testsuite_sqlpp.xml | 20 +++++++++++++- 15 files changed, 365 insertions(+), 1 deletion(-) diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java index 93b36c5..0f540ff 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java @@ -18,6 +18,8 @@ */ package org.apache.asterix.app.translator; +import static org.apache.asterix.common.exceptions.ErrorCode.UNKNOWN_DATAVERSE; + import java.io.File; import java.io.FileInputStream; import java.io.InputStream; @@ -629,6 +631,12 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen defaultCompactionPolicy, dd); Dataset dataset = null; try { + // Check if the dataverse exists + Dataverse dv = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, dataverseName); + if (dv == null) { + throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, sourceLoc, dataverseName); + } + IDatasetDetails datasetDetails = null; Dataset ds = metadataProvider.findDataset(dataverseName, datasetName); if (ds != null) { @@ -905,6 +913,12 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen MetadataLockUtil.createIndexBegin(lockManager, metadataProvider.getLocks(), dataverseName, datasetFullyQualifiedName); try { + // Check if the dataverse exists + Dataverse dv = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, dataverseName); + if (dv == null) { + throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, sourceLoc, dataverseName); + } + ds = metadataProvider.findDataset(dataverseName, datasetName); if (ds == null) { throw new CompilationException(ErrorCode.UNKNOWN_DATASET_IN_DATAVERSE, sourceLoc, datasetName, @@ -1558,6 +1572,11 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen metadataProvider.setMetadataTxnContext(mdTxnCtx.getValue()); List<JobSpecification> jobsToExecute = new ArrayList<>(); try { + // Check if the dataverse exists + Dataverse dv = MetadataManager.INSTANCE.getDataverse(mdTxnCtx.getValue(), dataverseName); + if (dv == null) { + throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, sourceLoc, dataverseName); + } Dataset ds = metadataProvider.findDataset(dataverseName, datasetName); if (ds == null) { if (ifExists) { @@ -1833,6 +1852,12 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen MetadataLockUtil.dropTypeBegin(lockManager, metadataProvider.getLocks(), dataverseName, dataverseName + "." + typeName); try { + // Check if the dataverse exists + Dataverse dv = MetadataManager.INSTANCE.getDataverse(mdTxnCtx, dataverseName); + if (dv == null) { + throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, sourceLoc, dataverseName); + } + Datatype dt = MetadataManager.INSTANCE.getDatatype(mdTxnCtx, dataverseName, typeName); if (dt == null) { if (!stmtTypeDrop.getIfExists()) { diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.000.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.000.ddl.sqlpp new file mode 100644 index 0000000..0e61805 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.000.ddl.sqlpp @@ -0,0 +1,32 @@ +/* + * 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 test; + +drop type test.myType if exists; +create type test.myType as open { id: uuid, f1: int }; + +drop dataset test.myDataset if exists; +create dataset test.myDataset(test.myType) primary key id autogenerated; + +use Default; +create index myIndex on test.myDataset(f1); + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.001.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.001.query.sqlpp new file mode 100644 index 0000000..2cf6a77 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.001.query.sqlpp @@ -0,0 +1,24 @@ +/* + * 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. + */ + +select m.DataverseName +from Metadata.`Index` m +where m.DatasetName = "myDataset" +and m.IndexName = "myIndex"; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.999.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.999.ddl.sqlpp new file mode 100644 index 0000000..5c1e653 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.999.ddl.sqlpp @@ -0,0 +1,21 @@ +/* + * 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; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.001.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.001.ddl.sqlpp new file mode 100644 index 0000000..0fb09b8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.001.ddl.sqlpp @@ -0,0 +1,21 @@ +/* + * 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 type fakeDataverse.myType if exists; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.002.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.002.ddl.sqlpp new file mode 100644 index 0000000..c6715e4 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.002.ddl.sqlpp @@ -0,0 +1,26 @@ +/* + * 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 realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type fakeDataverse.myType as open { id: uuid, f1: int }; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.003.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.003.ddl.sqlpp new file mode 100644 index 0000000..7d482dd --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.003.ddl.sqlpp @@ -0,0 +1,28 @@ +/* + * 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 realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type realDataverse.myType as open { id: uuid, f1: int }; + +drop dataset fakeDataverse.myDataset if exists; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.004.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.004.ddl.sqlpp new file mode 100644 index 0000000..2e33fc3 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.004.ddl.sqlpp @@ -0,0 +1,29 @@ +/* + * 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 realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type realDataverse.myType as open { id: uuid, f1: int }; + +drop dataset realDataverse.myDataset if exists; +create dataset fakeDataverse.myDataset(fakeDataverse.myType) primary key id autogenerated; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.005.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.005.ddl.sqlpp new file mode 100644 index 0000000..9723237 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.005.ddl.sqlpp @@ -0,0 +1,29 @@ +/* + * 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 realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type realDataverse.myType as open { id: uuid, f1: int }; + +drop dataset realDataverse.myDataset if exists; +create dataset realDataverse.myDataset(fakeDataverse.myType) primary key id autogenerated; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.006.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.006.ddl.sqlpp new file mode 100644 index 0000000..9c52c7b --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.006.ddl.sqlpp @@ -0,0 +1,29 @@ +/* + * 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 realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type realDataverse.myType as open { id: uuid, f1: int }; + +drop dataset realDataverse.myDataset if exists; +create dataset fakeDataverse.myDataset(realDataverse.myType) primary key id autogenerated; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.007.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.007.ddl.sqlpp new file mode 100644 index 0000000..56f08fd --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.007.ddl.sqlpp @@ -0,0 +1,29 @@ +/* + * 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 realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type realDataverse.myType as open { id: uuid, f1: int }; + +drop dataset realDataverse.myDataset if exists; +create dataset realDataverse.myDataset(realDataverse.myType) primary key id autogenerated; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.008.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.008.ddl.sqlpp new file mode 100644 index 0000000..9375963 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.008.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. + */ + +drop dataverse realDataverse if exists; +create dataverse realDataverse; +use realDataverse; + +drop type realDataverse.myType if exists; +create type realDataverse.myType as open { id: uuid, f1: int }; + +drop dataset realDataverse.myDataset if exists; +create dataset realDataverse.myDataset(realDataverse.myType) primary key id autogenerated; + +create index myIndex on fakeDataverse.myDataset(id); + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.099.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.099.ddl.sqlpp new file mode 100644 index 0000000..5440627 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/ddl/invalid-dataverse/invalid-dataverse.099.ddl.sqlpp @@ -0,0 +1,21 @@ +/* + * 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 realDataverse if exists; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.001.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.001.adm new file mode 100644 index 0000000..057d80a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/ddl/dataset-and-index-same-dataverse/dataset-and-index-same-dataverse.001.adm @@ -0,0 +1 @@ +{ "DataverseName": "test" } \ 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 3bed78a..f127fbd 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml @@ -3848,7 +3848,7 @@ </test-case> --> </test-group> - <test-group name="ddl/create-index"> + <test-group name="ddl"> <test-case FilePath="ddl/create-index"> <compilation-unit name="create-index-1"> <output-dir compare="Text">create-index-1</output-dir> @@ -3896,6 +3896,24 @@ <expected-error>Cannot drop index "ds". Drop dataset "ds" to remove this index</expected-error> </compilation-unit> </test-case> + <test-case FilePath="ddl"> + <compilation-unit name="invalid-dataverse"> + <output-dir compare="Text">invalid-dataverse</output-dir> + <source-location>false</source-location> + <expected-error>Cannot find dataverse with name fakeDataverse (in line 20, at column 1)</expected-error> + <expected-error>Cannot find dataverse with name fakeDataverse (in line 25, at column 1)</expected-error> + <expected-error>Cannot find dataverse with name fakeDataverse (in line 27, at column 1)</expected-error> + <expected-error>Cannot find dataverse with name fakeDataverse (in line 28, at column 1)</expected-error> + <expected-error>Cannot find datatype with name fakeDataverse.myType</expected-error> + <expected-error>Cannot find dataverse with name fakeDataverse (in line 28, at column 1)</expected-error> + <expected-error>Cannot find dataverse with name fakeDataverse (in line 30, at column 1)</expected-error> + </compilation-unit> + </test-case> + <test-case FilePath="ddl"> + <compilation-unit name="dataset-and-index-same-dataverse"> + <output-dir compare="Text">dataset-and-index-same-dataverse</output-dir> + </compilation-unit> + </test-case> </test-group> <test-group name="dml"> <test-case FilePath="dml">
