http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.3.ddl.aql deleted file mode 100644 index 0f6269a..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.3.ddl.aql +++ /dev/null @@ -1,29 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index interests_index on Customers(interests) type keyword; -
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.4.query.aql deleted file mode 100644 index 84fafef..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-edit-distance/olist-edit-distance.4.query.aql +++ /dev/null @@ -1,33 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -where len($a.interests) > 2 and len($b.interests) > 2 and edit-distance($a.interests, $b.interests) <= 1 and $a.cid < $b.cid -order by $a.cid, $b.cid -return { "a": $a.interests, "b": $b.interests } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.1.ddl.aql deleted file mode 100644 index fa5ffb1..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.1.ddl.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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * 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 CustomerType as closed { - cid: int32, - name: string, - age: int32?, - address: AddressType?, - interests: [string], - children: [ { name: string, age: int32? } ] -} - -create dataset Customers(CustomerType) primary key cid; - -create dataset Customers2(CustomerType) primary key cid; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.2.update.aql deleted file mode 100644 index 198d534..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.2.update.aql +++ /dev/null @@ -1,36 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -load dataset Customers -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - -load dataset Customers2 -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.3.ddl.aql deleted file mode 100644 index 239894b..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.3.ddl.aql +++ /dev/null @@ -1,30 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index interests_index on Customers(interests) type keyword; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.4.query.aql deleted file mode 100644 index 12e9111..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard-inline/olist-jaccard-inline.4.query.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -let $jacc := /*+ indexnl */similarity-jaccard($a.interests, $b.interests) -where $jacc >= 0.9f and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1 -order by $jacc, $a.cid, $b.cid -return { "a": $a.interests, "b": $b.interests, "jacc": $jacc } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.1.ddl.aql deleted file mode 100644 index 07bbd75..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.1.ddl.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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * 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 CustomerType as closed { - cid: int32, - name: string, - age: int32?, - address: AddressType?, - interests: [string], - children: [ { name: string, age: int32? } ] -} - -create dataset Customers(CustomerType) primary key cid; - -create dataset Customers2(CustomerType) primary key cid; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.2.update.aql deleted file mode 100644 index a67354e..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.2.update.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -load dataset Customers -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - -load dataset Customers2 -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.3.ddl.aql deleted file mode 100644 index 769abc7..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.3.ddl.aql +++ /dev/null @@ -1,29 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index interests_index on Customers(interests) type keyword; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.4.query.aql deleted file mode 100644 index caabec4..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/olist-jaccard/olist-jaccard.4.query.aql +++ /dev/null @@ -1,34 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest lists. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -where /*+ indexnl */ similarity-jaccard($a.interests, $b.interests) >= 0.9f - and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1 -order by $a.cid, $b.cid -return { "a": $a.interests, "b": $b.interests } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.1.ddl.aql deleted file mode 100644 index 270a68b..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.1.ddl.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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * 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 CustomerType as closed { - cid: int32, - name: string, - age: int32?, - address: AddressType?, - interests: {{string}}, - children: [ { name: string, age: int32? } ] -} - -create dataset Customers(CustomerType) primary key cid; - -create dataset Customers2(CustomerType) primary key cid; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.2.update.aql deleted file mode 100644 index 2cf6219..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.2.update.aql +++ /dev/null @@ -1,36 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -load dataset Customers -using localfs -(("path"="asterix_nc1://data/semistructured/co1k/customer.adm"),("format"="adm")); - -load dataset Customers2 -using localfs -(("path"="asterix_nc1://data/semistructured/co1k/customer.adm"),("format"="adm")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.3.ddl.aql deleted file mode 100644 index 6e1386d..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.3.ddl.aql +++ /dev/null @@ -1,30 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index interests_index on Customers(interests) type keyword; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.4.query.aql deleted file mode 100644 index 7ca2013..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard-inline/ulist-jaccard-inline.4.query.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -let $jacc := /*+ indexnl */ similarity-jaccard($a.interests, $b.interests) -where $jacc >= 0.9f and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1 -order by $jacc, $a.cid, $b.cid -return { "a": $a.interests, "b": $b.interests, "jacc": $jacc } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.1.ddl.aql deleted file mode 100644 index b3d4a99..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.1.ddl.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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * 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 CustomerType as closed { - cid: int32, - name: string, - age: int32?, - address: AddressType?, - interests: {{string}}, - children: [ { name: string, age: int32? } ] -} - -create dataset Customers(CustomerType) primary key cid; - -create dataset Customers2(CustomerType) primary key cid; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.2.update.aql deleted file mode 100644 index 053f655..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.2.update.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -load dataset Customers -using localfs -(("path"="asterix_nc1://data/semistructured/co1k/customer.adm"),("format"="adm")); - -load dataset Customers2 -using localfs -(("path"="asterix_nc1://data/semistructured/co1k/customer.adm"),("format"="adm")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.3.ddl.aql deleted file mode 100644 index 02695f1..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.3.ddl.aql +++ /dev/null @@ -1,29 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index interests_index on Customers(interests) type keyword; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.4.query.aql deleted file mode 100644 index 9bf2d0d..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/ulist-jaccard/ulist-jaccard.4.query.aql +++ /dev/null @@ -1,34 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the Jaccard similarity of their interest sets. - * Customers has a keyword index on interests, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -where /*+ indexnl */ similarity-jaccard($a.interests, $b.interests) >= 0.9f - and $a.cid < $b.cid and len($a.interests) > 1 and len($b.interests) > 1 -order by $a.cid, $b.cid -return { "a": $a.interests, "b": $b.interests } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.1.ddl.aql deleted file mode 100644 index da91e02..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.1.ddl.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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPType as closed { - id: int32, - dblpid: string, - title: string, - authors: string, - misc: string -} - -create type CSXType as closed { - id: int32, - csxid: string, - title: string, - authors: string, - misc: string -} - -create dataset DBLP(DBLPType) primary key id; - -create dataset CSX(CSXType) primary key id; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.2.update.aql deleted file mode 100644 index 98dc6fa..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.2.update.aql +++ /dev/null @@ -1,36 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -load dataset DBLP -using localfs -(("path"="asterix_nc1://data/dblp-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":")) pre-sorted; - -load dataset CSX -using localfs -(("path"="asterix_nc1://data/pub-small/csx-small-id.txt"),("format"="delimited-text"),("delimiter"=":"),("quote"="\u0000")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.3.ddl.aql deleted file mode 100644 index 08969f5..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.3.ddl.aql +++ /dev/null @@ -1,30 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index keyword_index on DBLP(title) type keyword; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.4.query.aql deleted file mode 100644 index 0e5d63f..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard-inline/word-jaccard-inline.4.query.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('DBLP') -for $b in dataset('CSX') -let $jacc := similarity-jaccard(word-tokens($a.title), word-tokens($b.title)) -where $jacc >= 0.5f and $a.id < $b.id -order by $jacc, $a.id, $b.id -return { "a": $a.title, "b": $b.title, "jacc": $jacc } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.1.ddl.aql deleted file mode 100644 index d07e72e..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.1.ddl.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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPType as closed { - id: int64, - dblpid: string, - title: string, - authors: string, - misc: string -} - -create type CSXType as closed { - id: int64, - csxid: string, - title: string, - authors: string, - misc: string -} - -create dataset DBLP(DBLPType) primary key id; - -create dataset CSX(CSXType) primary key id; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.2.update.aql deleted file mode 100644 index 07cbd22..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.2.update.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -load dataset DBLP -using localfs -(("path"="asterix_nc1://data/dblp-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":")) pre-sorted; - -load dataset CSX -using localfs -(("path"="asterix_nc1://data/pub-small/csx-small-id.txt"),("format"="delimited-text"),("delimiter"=":"),("quote"="\u0000")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.3.ddl.aql deleted file mode 100644 index 8d4ab1c..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.3.ddl.aql +++ /dev/null @@ -1,29 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; - -create index keyword_index on DBLP(title) type keyword; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.4.query.aql deleted file mode 100644 index a22cd15..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join-noeqjoin/word-jaccard/word-jaccard.4.query.aql +++ /dev/null @@ -1,34 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' word tokens. - * DBLP has a keyword index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We expect the top-level equi join introduced because of surrogate optimization to be removed, since it is not necessary. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('DBLP') -for $b in dataset('CSX') -where similarity-jaccard(word-tokens($a.title), word-tokens($b.title)) >= 0.5f - and $a.id < $b.id -order by $a.id, $b.id -return { "a": $a.title, "b": $b.title } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.1.ddl.aql deleted file mode 100644 index 654ae64..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.1.ddl.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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type AddressType as open { - number: int64, - street: string, - city: string -} - -create type CustomerType as open { - cid: int64, - name: string, - age: int64?, - address: AddressType?, - interests: [string], - children: [ { name: string, age: int64? } ] -} - -create dataset Customers(CustomerType) primary key cid; - -create dataset Customers2(CustomerType) primary key cid; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.2.update.aql deleted file mode 100644 index d71640e..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.2.update.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -use dataverse test; - -load dataset Customers -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - -load dataset Customers2 -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.3.ddl.aql deleted file mode 100644 index 127fca7..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.3.ddl.aql +++ /dev/null @@ -1,29 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -use dataverse test; - -create index ngram_index on Customers(name) type ngram(3); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.4.query.aql deleted file mode 100644 index c8e5109..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance-inline/ngram-edit-distance-inline.4.query.aql +++ /dev/null @@ -1,33 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -use dataverse test; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -let $ed := edit-distance($a.name, $b.name) -where $ed <= 4 and $a.cid < $b.cid -order by $ed, $a.cid, $b.cid -return { "arec": $a, "brec": $b, "ed": $ed } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.1.ddl.aql deleted file mode 100644 index aae1185..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.1.ddl.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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type AddressType as open { - number: int64, - street: string, - city: string -} - -create type CustomerType as open { - cid: int64, - name: string, - age: int64?, - address: AddressType?, - interests: [string], - children: [ { name: string, age: int64? } ] -} - -create dataset Customers(CustomerType) primary key cid; - -create dataset Customers2(CustomerType) primary key cid; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql deleted file mode 100644 index 1bfc87d..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.2.update.aql +++ /dev/null @@ -1,34 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -use dataverse test; - -load dataset Customers -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - -load dataset Customers2 -using localfs -(("path"="asterix_nc1://data/semistructured/co1k_olist/customer.adm"),("format"="adm")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql deleted file mode 100644 index 0422f95..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.3.ddl.aql +++ /dev/null @@ -1,28 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -use dataverse test; - -create index ngram_index on Customers(name) type ngram(3); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.4.query.aql deleted file mode 100644 index 490ab4b..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-edit-distance/ngram-edit-distance.4.query.aql +++ /dev/null @@ -1,31 +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 : Fuzzy joins two datasets, Customers and Customers2, based on the edit-distance function of their names. - * Customers has a 3-gram index on name, and we expect the join to be transformed into an indexed nested-loop join. - * Success : Yes - */ - -use dataverse test; - -for $a in dataset('Customers') -for $b in dataset('Customers2') -where edit-distance($a.name, $b.name) <= 4 and $a.cid < $b.cid -order by $a.cid, $b.cid -return { "arec": $a, "brec": $b } http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.1.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.1.ddl.aql deleted file mode 100644 index c165da7..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.1.ddl.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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' 3-gram tokens. - * DBLP has a 3-gram index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -drop dataverse test if exists; -create dataverse test; -use dataverse test; - -create type DBLPType as closed { - id: int64, - dblpid: string, - title: string, - authors: string, - misc: string -} - -create type CSXType as closed { - id: int64, - csxid: string, - title: string, - authors: string, - misc: string -} - -create dataset DBLP(DBLPType) primary key id; - -create dataset CSX(CSXType) primary key id; - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.2.update.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.2.update.aql deleted file mode 100644 index 2a241d9..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.2.update.aql +++ /dev/null @@ -1,35 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' 3-gram tokens. - * DBLP has a 3-gram index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -use dataverse test; - -load dataset DBLP -using localfs -(("path"="asterix_nc1://data/dblp-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":")) pre-sorted; - -load dataset CSX -using localfs -(("path"="asterix_nc1://data/pub-small/csx-small-id.txt"),("format"="delimited-text"),("delimiter"=":"),("quote"="\u0000")); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.3.ddl.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.3.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.3.ddl.aql deleted file mode 100644 index 957c6e6..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.3.ddl.aql +++ /dev/null @@ -1,29 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' 3-gram tokens. - * DBLP has a 3-gram index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -use dataverse test; - -create index ngram_index on DBLP(title) type ngram(3); - http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2660c630/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql deleted file mode 100644 index c3dcf11..0000000 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/inverted-index-join/ngram-jaccard-inline/ngram-jaccard-inline.4.query.aql +++ /dev/null @@ -1,34 +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 : Fuzzy joins two datasets, DBLP and CSX, based on the similarity-jaccard function of their titles' 3-gram tokens. - * DBLP has a 3-gram index on title, and we expect the join to be transformed into an indexed nested-loop join. - * We test the inlining of variables that enable the select to be pushed into the join for subsequent optimization with an index. - * Success : Yes - */ - -use dataverse test; -set import-private-functions 'true'; - -for $a in dataset('DBLP') -for $b in dataset('CSX') -let $jacc := similarity-jaccard(gram-tokens($a.title, 3, false), gram-tokens($b.title, 3, false)) -where $jacc >= 0.5f and $a.id < $b.id -order by $jacc, $a.id, $b.id -return { "arec": $a, "brec": $b, "jacc": $jacc }