Yingyi Bu has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/905
Change subject: ASTERIXDB-1025: a test case to verify the fix. ...................................................................... ASTERIXDB-1025: a test case to verify the fix. Change-Id: I3297cdd00a3e9dd2bf0cf209c75eb1e1cc564c4b --- A asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.ddl.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.2.update.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.3.query.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.4.ddl.aql A asterixdb/asterix-app/src/test/resources/runtimets/results/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml 6 files changed, 127 insertions(+), 0 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/05/905/1 diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.ddl.aql new file mode 100644 index 0000000..f4eb328 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.ddl.aql @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +drop dataverse TinyCollege if exists; +create dataverse TinyCollege; +use dataverse TinyCollege; + +create type MentorType as open +{ + name:string +} + +create type StaffType as open +{ + name: string, + office: string, + employment: interval, + mentor: MentorType +} + +create dataset Staff(StaffType) primary key name; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.2.update.aql new file mode 100644 index 0000000..66514f8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.2.update.aql @@ -0,0 +1,36 @@ +/* + * 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. + */ + +use dataverse TinyCollege; + +insert into dataset Staff ({"name":"Alex", "office":"A", "employment":interval(date("2003-01-01"), date("2008-01-01")), "mentor": +{"name":"Agent K", "status":"unknown"} +, "kids":{"name":"Joe","age":13}}); + +insert into dataset Staff ({"name":"Frank", "office":"A", "employment":interval(date("2004-01-01"), date("2009-01-01")), "mentor": +{"name":"Agent K", "status":"unknown"} +, "kids":{"name":"Wrae","age":10}}); + +insert into dataset Staff ({"name":"Henry", "office":"C", "employment":interval(date("2003-01-01"), date("2008-01-01")), "mentor":{"name":"Agent K", "status":"unknown"}}); + +insert into dataset Staff ({"name":"Mary", "office":"B", "employment":interval(date("2006-01-01"), date("2010-01-01")), "mentor": +{"name":"Agent K", "status":"unknown"} +, "kids":{"name":"Jill","age":11}}); + +insert into dataset Staff ({"name":"Vicky", "office":"D", "employment":interval(date("2001-01-01"), date("2010-01-01")), "mentor":{"name":"Agent K", "status":"unknown"}}); diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.3.query.aql new file mode 100644 index 0000000..3d1a8b5 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.3.query.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +use dataverse TinyCollege; + +for $f in dataset TinyCollege.Staff +order by $f.name +return $f.kids; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.4.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.4.ddl.aql new file mode 100644 index 0000000..b6ddd8e --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.4.ddl.aql @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +drop dataverse TinyCollege; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.adm new file mode 100644 index 0000000..d78c93a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/nestrecords/query-ASTERIXDB-1025/query-ASTERIXDB-1025.1.adm @@ -0,0 +1,5 @@ +{ "name": "Joe", "age": 13 } +{ "name": "Wrae", "age": 10 } +null +{ "name": "Jill", "age": 11 } +null diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml index 0b19e22..83945e3 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml @@ -3919,6 +3919,11 @@ <output-dir compare="Text">nestrecord</output-dir> </compilation-unit> </test-case> + <test-case FilePath="nestrecords"> + <compilation-unit name="query-ASTERIXDB-1025"> + <output-dir compare="Text">query-ASTERIXDB-1025</output-dir> + </compilation-unit> + </test-case> </test-group> <test-group name="numeric"> <test-case FilePath="numeric"> -- To view, visit https://asterix-gerrit.ics.uci.edu/905 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3297cdd00a3e9dd2bf0cf209c75eb1e1cc564c4b Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi Bu <[email protected]>
