Yingyi Bu has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/723
Change subject: Add test queries with meta() over ingested feeds. ...................................................................... Add test queries with meta() over ingested feeds. Change-Id: I7f18282a4c8e79a2d2fcd596a79c8819a951b219 --- A asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.query.aql A asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.query.aql A asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.query.aql R asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.7.ddl.aql A asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.query.aql A asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.query.aql R asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.6.ddl.aql A asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.adm A asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.adm A asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.adm D asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.adm A asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.adm A asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.adm 13 files changed, 164 insertions(+), 50 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/23/723/1 diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.query.aql new file mode 100644 index 0000000..b696974 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.query.aql @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create a change feed and test ingestion of records + * Expected Res : Success + * Date : 24th Feb 2016 + */ +use dataverse KeyVerse; + +count( + for $d in dataset KVStore + return $d +); diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.query.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.query.aql new file mode 100644 index 0000000..28e9a15 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.query.aql @@ -0,0 +1,30 @@ +/* + * 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 : Create a change feed and test ingestion of records + * Expected Res : Success + * Date : 24th Feb 2016 + */ +use dataverse KeyVerse; + +count( +for $d in dataset KVStore +distinct by meta()."key" +return 1 +); diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.query.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.query.aql new file mode 100644 index 0000000..7423399 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.query.aql @@ -0,0 +1,34 @@ +/* + * 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 : Create a change feed and test ingestion of records + * Expected Res : Success + * Date : 24th Feb 2016 + */ +use dataverse KeyVerse; + + +for $d in dataset KVStore +group by $vb := meta().vbucket with $d +order by $vb +limit 5 +return { + "vbucket": $vb, + "tuple_count": count($d) +}; diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.7.ddl.aql similarity index 100% rename from asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.ddl.aql rename to asterix-app/src/test/resources/runtimets/queries/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.7.ddl.aql diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.query.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.query.aql new file mode 100644 index 0000000..b696974 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.query.aql @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create a change feed and test ingestion of records + * Expected Res : Success + * Date : 24th Feb 2016 + */ +use dataverse KeyVerse; + +count( + for $d in dataset KVStore + return $d +); diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.query.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.query.aql new file mode 100644 index 0000000..864ce01 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.query.aql @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Description : Create a change feed and test ingestion of records + * Expected Res : Success + * Date : 24th Feb 2016 + */ +use dataverse KeyVerse; + +for $d in dataset KVStore +order by meta().id +limit 5 +return meta().id; diff --git a/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.6.ddl.aql similarity index 100% rename from asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.ddl.aql rename to asterix-app/src/test/resources/runtimets/queries/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.6.ddl.aql diff --git a/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.adm b/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.adm new file mode 100644 index 0000000..c31da8b --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.4.adm @@ -0,0 +1 @@ +804 \ No newline at end of file diff --git a/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.adm b/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.adm new file mode 100644 index 0000000..c31da8b --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.5.adm @@ -0,0 +1 @@ +804 \ No newline at end of file diff --git a/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.adm b/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.adm new file mode 100644 index 0000000..3a4fd70 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/results/feeds/change-feed-with-meta-pk-in-meta/change-feed-with-meta-pk-in-meta.6.adm @@ -0,0 +1,5 @@ +{ "vbucket": 0i32, "tuple_count": 1 } +{ "vbucket": 1i32, "tuple_count": 1 } +{ "vbucket": 2i32, "tuple_count": 1 } +{ "vbucket": 3i32, "tuple_count": 1 } +{ "vbucket": 4i32, "tuple_count": 1 } \ No newline at end of file diff --git a/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.adm b/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.adm deleted file mode 100644 index 8ba1df3..0000000 --- a/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.1.adm +++ /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 : Create a change feed with meta-data and test ingestion of records - * Expected Res : Success - * Date : 24th Feb 2016 - */ - -drop dataverse Couchbase if exists; -create dataverse Couchbase; -use dataverse Couchbase; - -create type DocumentType as open{ -}; - -create type CouchbaseMetaType as open{ -id:string, -flags:int32, -expiration:int32, -cas:int64, -rev:int64, -vbid:int32, -dtype:int32, -}; - -create dataset CouchFeedDataset(DocumentType) with meta(CouchbaseMetaType)primary key meta()."key"; - -create feed CouchFeedWithMeta using FeedAdapter( - ("type-name"="DocumentType"), - ("meta-type-name"="CouchbaseMetaType"), - ("reader"="csv-with-record"), - ("path"="..."), - ("format"="record-with-meta") -); \ No newline at end of file diff --git a/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.adm b/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.adm new file mode 100644 index 0000000..06657ed --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.4.adm @@ -0,0 +1 @@ +7307 \ No newline at end of file diff --git a/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.adm b/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.adm new file mode 100644 index 0000000..19b02a5 --- /dev/null +++ b/asterix-app/src/test/resources/runtimets/results/feeds/feed-with-meta-pk-in-meta/feed-with-meta-pk-in-meta.5.adm @@ -0,0 +1,5 @@ +"21st_amendment_brewery_cafe" +"21st_amendment_brewery_cafe-21a_ipa" +"21st_amendment_brewery_cafe-563_stout" +"21st_amendment_brewery_cafe-amendment_pale_ale" +"21st_amendment_brewery_cafe-bitter_american" \ No newline at end of file -- To view, visit https://asterix-gerrit.ics.uci.edu/723 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f18282a4c8e79a2d2fcd596a79c8819a951b219 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi Bu <[email protected]>
