http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-44.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-44.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-44.aql deleted file mode 100644 index c5a2ed6..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-44.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is NOT used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -// Negative test - prefix search - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-42.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname > "Allan" and $emp.nested.lname = "Xu" -return $emp
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-45.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-45.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-45.aql deleted file mode 100644 index 68fe56c..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-45.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is NOT used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -// Negative test - prefix search - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-43.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname = "Julio" and $emp.nested.lname < "Xu" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-46.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-46.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-46.aql deleted file mode 100644 index bd52b20..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-46.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is NOT used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-44.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname >= "Michael" and $emp.nested.lname <= "Xu" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-47.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-47.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-47.aql deleted file mode 100644 index d611ab5..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-47.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-45.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname > "Craig" and $emp.nested.lname > "Kevin" and $emp.nested.fname < "Mary" and $emp.nested.lname < "Tomes" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-48.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-48.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-48.aql deleted file mode 100644 index 2e95662..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-48.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-46.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname >= "Craig" and $emp.nested.lname >= "Kevin" and $emp.nested.fname <= "Mary" and $emp.nested.lname <= "Tomes" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-49.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-49.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-49.aql deleted file mode 100644 index 49ebe6e..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-49.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is NOT used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-47.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname <= "Craig" and $emp.nested.lname > "Kevin" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-51.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-51.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-51.aql deleted file mode 100644 index 1beb7a1..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-51.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-49.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname > "Craig" and $emp.nested.lname > "Kevin" and $emp.nested.fname <= "Mary" and $emp.nested.lname <= "Tomes" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-52.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-52.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-52.aql deleted file mode 100644 index a923d50..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-52.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-50.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname >= "Craig" and $emp.nested.lname >= "Kevin" and $emp.nested.fname < "Mary" and $emp.nested.lname < "Tomes" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-53.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-53.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-53.aql deleted file mode 100644 index d688ca0..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-53.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-51.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname:string?,nested.lname:string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname >= "Craig" and $emp.nested.lname <= "Kevin" and $emp.nested.fname <= "Mary" and $emp.nested.lname >= "Tomes" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-54.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-54.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-54.aql deleted file mode 100644 index ec20642..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-54.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-52.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname > "Max" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-55.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-55.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-55.aql deleted file mode 100644 index f06f66b..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-55.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-53.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname >= "Sofia" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-56.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-56.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-56.aql deleted file mode 100644 index 7767eae..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-56.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-54.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname < "Chen" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-57.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-57.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-57.aql deleted file mode 100644 index ad37e48..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-57.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-55.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname <= "Julio" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-58.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-58.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-58.aql deleted file mode 100644 index 54d5620..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-58.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the primary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-primary-56.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname > "Neil" and $emp.nested.fname < "Roger" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-59.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-59.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-59.aql deleted file mode 100644 index 31de2dc..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-59.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-57.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname >= "Max" and $emp.nested.fname <= "Roger" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-60.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-60.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-60.aql deleted file mode 100644 index 90ac78d..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-60.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-58.adm"; - -create type TestTypetmp as open { - id : int32, - lname : string -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname = "Max" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-61.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-61.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-61.aql deleted file mode 100644 index 468ff65..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-61.aql +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 13th Aug 2012 - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-59.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?,nested.lname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname > "Craig" and $emp.nested.lname > "Kevin" and $emp.nested.fname <= "Mary" and $emp.nested.lname < "Tomes" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-62.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-62.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-62.aql deleted file mode 100644 index 9d4747a..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-62.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 11th Nov 2014 - */ - -// Positive test - prefix search - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-62.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?,nested.lname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname = "Julio" and $emp.nested.lname > "Xu" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-63.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-63.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-63.aql deleted file mode 100644 index 3d7f09d..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/btree-index/btree-secondary-63.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : BTree Index verification test - * : This test is intended to verify that the secondary BTree index is used - * : in the optimized query plan. - * Expected Result : Success - * Date : 11th Nov 2014 - */ - -// Positive test - prefix search - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -write output to asterix_nc1:"rttest/btree-index_btree-secondary-63.adm"; - -create type TestTypetmp as open { - id : int32 -} - -create type TestType as open { - nested : TestTypetmp -} - -create dataset testdst(TestType) primary key nested.id; - -create index sec_Idx on testdst(nested.fname: string?,nested.lname: string?) enforced; - -for $emp in dataset('testdst') -where $emp.nested.fname < "Julio" and $emp.nested.lname = "Xu" -return $emp http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains-panic.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains-panic.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains-panic.aql deleted file mode 100644 index 5deef93..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains-panic.aql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the contains function. - * The index should *not* be applied (see below). - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-contains-panic.adm"; - -// Cannot optimize this query because the string constant is shorter than the gram length. -for $o in dataset('DBLP') -where contains($o.nested.title, "Mu") -order by $o.nested.id -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains.aql deleted file mode 100644 index 91dea54..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-contains.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the contains function. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-contains.adm"; - -for $o in dataset('DBLP') -where contains($o.nested.title, "Multimedia") -order by $o.nested.id -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance-check.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance-check.aql deleted file mode 100644 index 601b5d4..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance-check.aql +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the edit-distance-check function on strings. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - title: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.authors: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-edit-distance-check.adm"; - -for $o in dataset('DBLP') -where edit-distance-check($o.nested.authors, "Amihay Motro", 1)[0] -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance.aql deleted file mode 100644 index 98aca8b..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-edit-distance.aql +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the edit-distance function on strings. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - title: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.authors: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-edit-distance.adm"; - -for $o in dataset('DBLP') -where edit-distance($o.nested.authors, "Amihay Motro") <= 1 -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql deleted file mode 100644 index c73d0cf..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query with ~= using edit-distance on strings. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - title: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.authors: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-fuzzyeq-edit-distance.adm"; - -set simfunction 'edit-distance'; -set simthreshold '1'; - -for $o in dataset('DBLP') -where $o.nested.authors ~= "Amihay Motro" -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql deleted file mode 100644 index 02740e0..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query with ~= using Jaccard on 3-gram tokens. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; -set import-private-functions 'true'; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-fuzzyeq-jaccard.adm"; - -set simfunction 'jaccard'; -set simthreshold '0.8f'; - -for $o in dataset('DBLP') -where gram-tokens($o.nested.title, 3, false) ~= gram-tokens("Transactions for Cooperative Environments", 3, false) -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard-check.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard-check.aql deleted file mode 100644 index 36a1ecf..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard-check.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the similarity-jaccard-check function on 3-gram tokens. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; -set import-private-functions 'true'; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-jaccard-check.adm"; - -for $o in dataset('DBLP') -where similarity-jaccard-check(gram-tokens($o.nested.title, 3, false), gram-tokens("Transactions for Cooperative Environments", 3, false), 0.5f)[0] -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard.aql deleted file mode 100644 index 5c3ec7e..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/ngram-jaccard.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the similarity-jaccard function on 3-gram tokens. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; -set import-private-functions 'true'; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_ngram-jaccard.adm"; - -for $o in dataset('DBLP') -where similarity-jaccard(gram-tokens($o.nested.title, 3, false), gram-tokens("Transactions for Cooperative Environments", 3, false)) >= 0.5f -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-contains.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-contains.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-contains.aql deleted file mode 100644 index 229ee52..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-contains.aql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether a keyword index is applied to optimize a selection query using the contains function. - * The index should *not* be applied (see below). - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index keyword_index on DBLP(nested.title: string?) type keyword enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_word-contains.adm"; - -// Contains cannot be answered with a word inverted index. -for $o in dataset('DBLP') -where contains($o.nested.title, "Multimedia") -order by $o.nested.id -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-fuzzyeq-jaccard.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-fuzzyeq-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-fuzzyeq-jaccard.aql deleted file mode 100644 index 3dd9b51..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-fuzzyeq-jaccard.aql +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether a keyword is applied to optimize a selection query with ~= using Jaccard on word tokens. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index keyword_index on DBLP(nested.title: string?) type keyword enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_word-fuzzyeq-jaccard.adm"; - -set simfunction 'jaccard'; -set simthreshold '0.5f'; - -for $o in dataset('DBLP') -where word-tokens($o.nested.title) ~= word-tokens("Transactions for Cooperative Environments") -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard-check.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard-check.aql deleted file mode 100644 index f5d9a78..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard-check.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether a keyword index is applied to optimize a selection query using the similarity-jaccard-check function on word tokens. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index keyword_index on DBLP(nested.title: string?) type keyword enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_word-jaccard-check.adm"; - -for $o in dataset('DBLP') -where similarity-jaccard-check(word-tokens($o.nested.title), word-tokens("Transactions for Cooperative Environments"), 0.5f)[0] -return $o - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard.aql deleted file mode 100644 index fafbf71..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-basic/word-jaccard.aql +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether a keyword index is applied to optimize a selection query using the similarity-jaccard function on word tokens. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index keyword_index on DBLP(nested.title: string?) type keyword enforced; - -write output to asterix_nc1:"rttest/inverted-index-basic_word-jaccard.adm"; - -for $o in dataset('DBLP') -where similarity-jaccard(word-tokens($o.nested.title), word-tokens("Transactions for Cooperative Environments")) >= 0.5f -return $o - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.aql deleted file mode 100644 index 71381ee..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.aql +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using - * two edit-distance-check function of which only the first can be optimized with an index. - * Tests that the optimizer rule correctly drills through the let clauses. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - title: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.authors: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-complex_ngram-edit-distance-check-let-panic-nopanic_01.adm"; - -// Only the first edit-distance-check can be optimized with an index. -for $o in dataset('DBLP') -let $eda := edit-distance-check($o.nested.authors, "Amihay Motro", 3) -let $edb := edit-distance-check($o.nested.authors, "Amihay Motro", 5) -where $eda[0] and $edb[0] -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.aql deleted file mode 100644 index cf14fd7..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.aql +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using - * two edit-distance-check function of which only the second can be optimized with an index. - * Tests that the optimizer rule correctly drills through the let clauses. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - title: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.authors: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-complex_ngram-edit-distance-check-let-panic-nopanic_01.adm"; - -// Only the second edit-distance-check can be optimized with an index. -for $o in dataset('DBLP') -let $edb := edit-distance-check($o.nested.authors, "Amihay Motro", 5) -let $eda := edit-distance-check($o.nested.authors, "Amihay Motro", 3) -where $edb[0] and $eda[0] -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let.aql deleted file mode 100644 index b54f365..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-let.aql +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the edit-distance-check function on strings. - * Tests that the optimizer rule correctly drills through the let clauses. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - title: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.authors: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-complex_ngram-edit-distance-check-let.adm"; - -for $o in dataset('DBLP') -let $ed := edit-distance-check($o.nested.authors, "Amihay Motro", 1) -where $ed[0] -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-substring.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-substring.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-substring.aql deleted file mode 100644 index 7fd8079..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-edit-distance-check-substring.aql +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index index is applied to optimize a selection query using the similarity-edit-distance-check function on the substring of the field. - * Tests that the optimizer rule correctly drills through the substring function. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPNestedType as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested: DBLPNestedType -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-complex_ngram-edit-distance-check-substring.adm"; - -for $paper in dataset('DBLP') -where edit-distance-check(substring($paper.nested.title, 0, 8), "datbase", 1)[0] -return { - "id" : $paper.nested.id, - "title" : $paper.nested.title -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.aql deleted file mode 100644 index 8c70a1c..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-let.aql +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the similarity-jaccard-check function on 3-gram tokens. - * Tests that the optimizer rule correctly drills through the let clauses. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; -set import-private-functions 'true'; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-complex_ngram-jaccard-check-let.adm"; - -for $o in dataset('DBLP') -let $jacc := similarity-jaccard-check(gram-tokens($o.nested.title, 3, false), gram-tokens("Transactions for Cooperative Environments", 3, false), 0.5f) -where $jacc[0] -return $o http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql deleted file mode 100644 index cfa6247..0000000 --- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-open-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -/* - * Description : Tests whether an ngram_index is applied to optimize a selection query using the similarity-jaccard-check function on 3-gram tokens. - * Tests that the optimizer rule correctly drills through the let clauses. - * The index should be applied. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; -set import-private-functions 'true'; - -create type DBLPTypetmp as open { - id: int32, - dblpid: string, - authors: string, - misc: string -} - -create type DBLPType as closed { - nested : DBLPTypetmp -} - -create dataset DBLP(DBLPType) primary key nested.id; - -create index ngram_index on DBLP(nested.title: string?) type ngram(3) enforced; - -write output to asterix_nc1:"rttest/inverted-index-complex_ngram-jaccard-check-multi-let.adm"; - -// This test is complex because we have three assigns to drill into. -for $paper in dataset('DBLP') -let $paper_tokens := gram-tokens($paper.nested.title, 3, false) -let $query_tokens := gram-tokens("Transactions for Cooperative Environments", 3, false) -let $jacc := similarity-jaccard-check($paper_tokens, $query_tokens, 0.5f) -where $jacc[0] -return {"Paper": $paper_tokens, "Query": $query_tokens }