You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2018/10/17 21:23:36 UTC

[49/51] [partial] asterixdb git commit: [ASTERIXDB-2454] Remove non-unique AQL tests

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-58.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-58.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-58.aql
deleted file mode 100644
index 28e321f..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-58.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     : 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,
-    fname : string,
-    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);
-
-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-index/btree-index/btree-secondary-59.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-59.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-59.aql
deleted file mode 100644
index 9060d83..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-59.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     : 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,
-    fname : string,
-    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);
-
-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-index/btree-index/btree-secondary-60.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-60.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-60.aql
deleted file mode 100644
index c1840d3..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-60.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     : 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,
-    fname : string,
-    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);
-
-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-index/btree-index/btree-secondary-61.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-61.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-61.aql
deleted file mode 100644
index 1b17b05..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-61.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            : 13th Aug 2012
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-write output to asterix_nc1:"rttest/btree-index_btree-secondary-61.adm";
-
-create type TestTypetmp as open {
-    id : int32,
-    fname : string,
-    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,nested.lname);
-
-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-index/btree-index/btree-secondary-62.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-62.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-62.aql
deleted file mode 100644
index 15c84be..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-62.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     : 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,
-    fname : string,
-    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,nested.lname);
-
-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-index/btree-index/btree-secondary-63.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-63.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-63.aql
deleted file mode 100644
index 2e32bcb..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/btree-index/btree-secondary-63.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     : 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,
-    fname : string,
-    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,nested.lname);
-
-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-index/inverted-index-basic/ngram-contains-panic.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-contains-panic.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-contains-panic.aql
deleted file mode 100644
index f977606..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-contains-panic.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-basic/ngram-contains.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-contains.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-contains.aql
deleted file mode 100644
index 63e3dba..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-basic/ngram-edit-distance-check.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-edit-distance-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-edit-distance-check.aql
deleted file mode 100644
index 7551a42..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-edit-distance-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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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.authors) type ngram(3);
-
-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-index/inverted-index-basic/ngram-edit-distance.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-edit-distance.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-edit-distance.aql
deleted file mode 100644
index dc0baa5..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-edit-distance.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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.authors) type ngram(3);
-
-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-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.aql
deleted file mode 100644
index c466756..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-fuzzyeq-edit-distance.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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.authors) type ngram(3);
-
-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-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-fuzzyeq-jaccard.aql
deleted file mode 100644
index 346174c..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-fuzzyeq-jaccard.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-basic/ngram-jaccard-check.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-jaccard-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-jaccard-check.aql
deleted file mode 100644
index d587987..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-jaccard-check.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-basic/ngram-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-jaccard.aql
deleted file mode 100644
index be61a9d..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ngram-jaccard.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-basic/olist-edit-distance-check-panic.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check-panic.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check-panic.aql
deleted file mode 100644
index 03072ea..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check-panic.aql
+++ /dev/null
@@ -1,62 +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 edit-distance-check function on lists.
- *                  The index should *not* be applied (see below).
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
-
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-edit-distance-check-panic.adm";
-
-// Index should not be applied because all list elements can be modified by 3 edit operations.
-for $c in dataset('Customers')
-where edit-distance-check($c.nested.interests, ["computers", "wine", "walking"], 3)[0]
-order by $c.nested.cid
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check.aql
deleted file mode 100644
index 45e12bf..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-check.aql
+++ /dev/null
@@ -1,60 +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 edit-distance-check function on lists.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-edit-distance-check.adm";
-
-for $c in dataset('Customers')
-where edit-distance-check($c.nested.interests, ["computers", "wine", "walking"], 1)[0]
-order by $c.nested.cid
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-panic.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-panic.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-panic.aql
deleted file mode 100644
index 3998789..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance-panic.aql
+++ /dev/null
@@ -1,62 +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 edit-distance function on lists.
- *                  The index should *not* be applied (see below).
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-edit-distance-panic.adm";
-
-// Index should not be applied because all list elements can be modified by 3 edit operations.
-for $c in dataset('Customers')
-where edit-distance($c.nested.interests, ["computers", "wine", "walking"]) <= 3
-order by $c.nested.cid
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance.aql
deleted file mode 100644
index c5c67a0..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-edit-distance.aql
+++ /dev/null
@@ -1,61 +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 edit-distance function on lists.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-edit-distance.adm";
-
-for $c in dataset('Customers')
-where edit-distance($c.nested.interests, ["computers", "wine", "walking"]) <= 1
-order by $c.nested.cid
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-edit-distance.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-edit-distance.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-edit-distance.aql
deleted file mode 100644
index f802444..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-edit-distance.aql
+++ /dev/null
@@ -1,61 +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 with ~= using edit-distance on lists.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
-
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-fuzzyeq-edit-distance.adm";
-
-set simfunction 'edit-distance';
-set simthreshold '1';
-
-for $c in dataset('Customers')
-where $c.nested.interests ~= ["computers", "wine", "walking"]
-order by $c.nested.cid
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-jaccard.aql
deleted file mode 100644
index 6ffff30..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-fuzzyeq-jaccard.aql
+++ /dev/null
@@ -1,60 +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 lists.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-fuzzyeq-jaccard.adm";
-
-set simfunction 'jaccard';
-set simthreshold '0.8f';
-
-for $c in dataset('Customers')
-where $c.nested.interests ~= ["databases", "computers", "wine"]
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard-check.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard-check.aql
deleted file mode 100644
index c618992..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard-check.aql
+++ /dev/null
@@ -1,57 +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 lists.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
-
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-jaccard-check.adm";
-
-for $c in dataset('Customers')
-where similarity-jaccard-check($c.nested.interests, ["databases", "computers", "wine"], 0.7f)[0]
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard.aql
deleted file mode 100644
index 47e900e..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/olist-jaccard.aql
+++ /dev/null
@@ -1,58 +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 lists.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: [string],
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_olist-jaccard.adm";
-
-for $c in dataset('Customers')
-where similarity-jaccard($c.nested.interests, ["databases", "computers", "wine"]) >= 0.7f
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-fuzzyeq-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-fuzzyeq-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-fuzzyeq-jaccard.aql
deleted file mode 100644
index a3237a6..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-fuzzyeq-jaccard.aql
+++ /dev/null
@@ -1,61 +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 sets.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: {{string}},
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_ulist-fuzzyeq-jaccard.adm";
-
-set simfunction 'jaccard';
-set simthreshold '0.8f';
-
-for $c in dataset('Customers')
-where $c.nested.interests ~= {{"computers", "wine", "databases"}}
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard-check.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard-check.aql
deleted file mode 100644
index 9f5cce6..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard-check.aql
+++ /dev/null
@@ -1,58 +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 sets.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: {{string}},
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_ulist-jaccard.adm";
-
-for $c in dataset('Customers')
-where similarity-jaccard-check($c.nested.interests, {{"computers", "wine", "databases"}}, 0.7f)[0]
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard.aql
deleted file mode 100644
index 7ebe334..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/ulist-jaccard.aql
+++ /dev/null
@@ -1,58 +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 sets.
- *                  The index should be applied.
- * Success        : Yes
- */
-
-drop dataverse test if exists;
-create dataverse test;
-use dataverse test;
-
-create type AddressType as closed {
-  number: int32,
-  street: string,
-  city: string
-}
-
-create type CustomerTypetmp as closed {
-  cid: int32,
-  name: string,
-  age: int32?,
-  address: AddressType?,
-  interests: {{string}},
-  children: [ { name: string, age: int32? } ]
-}
-
-create type CustomerType as closed {
-  nested : CustomerTypetmp
-}
-
-create dataset Customers(CustomerType) primary key nested.cid;
- 
-create dataset Customers2(CustomerType) primary key nested.cid;
-
-create index interests_index on Customers(nested.interests) type keyword;
-
-write output to asterix_nc1:"rttest/inverted-index-basic_ulist-jaccard.adm";
-
-for $c in dataset('Customers')
-where similarity-jaccard($c.nested.interests, {{"computers", "databases", "wine"}}) >= 0.7f
-return $c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f372c96d/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-contains.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-contains.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-contains.aql
deleted file mode 100644
index 20bb147..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-contains.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type keyword;
-
-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-index/inverted-index-basic/word-fuzzyeq-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-fuzzyeq-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-fuzzyeq-jaccard.aql
deleted file mode 100644
index f77591c..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type keyword;
-
-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-index/inverted-index-basic/word-jaccard-check.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-jaccard-check.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-jaccard-check.aql
deleted file mode 100644
index 5df3ee3..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-jaccard-check.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type keyword;
-
-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-index/inverted-index-basic/word-jaccard.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-jaccard.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-jaccard.aql
deleted file mode 100644
index 5aa8f6e..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-basic/word-jaccard.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type keyword;
-
-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-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-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.aql
deleted file mode 100644
index 6fbccc9..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_01.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
- *                  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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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.authors) type ngram(3);
-
-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-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-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.aql
deleted file mode 100644
index bb2d7a0..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-let-panic-nopanic_02.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
- *                  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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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.authors) type ngram(3);
-
-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-index/inverted-index-complex/ngram-edit-distance-check-let.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-let.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-let.aql
deleted file mode 100644
index a507b05..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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.authors) type ngram(3);
-
-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-index/inverted-index-complex/ngram-edit-distance-check-substring.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-substring.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-substring.aql
deleted file mode 100644
index 4dac57c..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-edit-distance-check-substring.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-complex/ngram-jaccard-check-let.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-jaccard-check-let.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-jaccard-check-let.aql
deleted file mode 100644
index 4067927..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-jaccard-check-let.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 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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql
deleted file mode 100644
index 30f3ca4..0000000
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/nested-index/inverted-index-complex/ngram-jaccard-check-multi-let.aql
+++ /dev/null
@@ -1,55 +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 closed {
-  id: int32,
-  dblpid: string,
-  title: 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) type ngram(3);
-
-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 }