>From Shahrzad Shirazi <shaji...@ucr.edu>: Shahrzad Shirazi has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20368?usp=email )
Change subject: [NO ISSUE][COMP] Adding UPDATE statement testcases ...................................................................... [NO ISSUE][COMP] Adding UPDATE statement testcases Change-Id: I0d908fbf6ea084855157e6271fd0e58d61870d3c --- A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.1.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.2.ddl.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.3.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.4.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.10.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.11.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.12.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.13.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.5.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.6.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.7.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.8.update.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.9.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.11.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.13.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.5.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.7.adm A asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.9.adm M asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml 19 files changed, 470 insertions(+), 1 deletion(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/20368/1 diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.1.ddl.sqlpp new file mode 100644 index 0000000..c68a532 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.1.ddl.sqlpp @@ -0,0 +1,35 @@ +/* + * 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 test if exists; +create dataverse test; +use test; + + +CREATE TYPE UserType AS { + userId : int, + email : string, + username : string, + isActive : boolean +}; + +create dataset UserTypes(UserType) primary key userId; + + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.2.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.2.ddl.sqlpp new file mode 100644 index 0000000..d324914 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.2.ddl.sqlpp @@ -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 test; + +create index idx_user_age on UserTypes(age); +--This is created to test if the updated data is also reachable from the secondary index. diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.3.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.3.update.sqlpp new file mode 100644 index 0000000..ea6fa8b --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.3.update.sqlpp @@ -0,0 +1,116 @@ +/* + * 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 test; + +INSERT INTO UserTypes ( + [ + { + "userId": 1, + "email": "john....@example.com", + "username": "johndoe", + "isActive": true, + "occupation": "teacher", + "age": 23 + }, + { + "userId": 2, + "email": "jane.sm...@example.com", + "username": "janesmith", + "isActive": false, + "occupation": "firefighter" + + + }, + { + "userId": 3, + "email": "michael.br...@example.com", + "username": "michaelb", + "isActive": true, + "age": "five", + "occupation":4 + + }, + { + "userId": 4, + "email": "emily.da...@example.com", + "username": "emilyd", + "isActive": true, + "age": 23.1 + + }, + { + "userId": 5, + "email": "chris.jo...@example.com", + "username": "chrisj", + "isActive": false, + "age": "old" + + }, + { + "userId": 6, + "email": "patricia.gar...@example.com", + "username": "patriciag", + "isActive": true, + "age": "45" + + }, + { + "userId": 7, + "email": "linda.marti...@example.com", + "username": "lindam", + "isActive": false + }, + { + "userId": 8, + "email": "robert....@example.com", + "username": "robertl", + "isActive": true, + "age": 31 + + }, + { + "userId": 9, + "email": "james.wil...@example.com", + "username": "jamesw", + "isActive": true, + "age": "65" + + }, + { + "userId": 10, + "email": "mary.mo...@example.com", + "username": "marym", + "isActive": false, + "age": "", + "addresses":[ {"city": "Riverside","zipcode" : 92510}] + + }, + { + "userId": 11, + "email": "jack.mo...@example.com", + "username": "jk", + "isActive": true, + "age": "20", + "occupation": "firefighter", + "addresses":[ {"city": "San Jose, United States", "street" : "Santana Row","zipcode" : 95128},{"city": "Riverside","zipcode" : 92507}] + } + ] + +); \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.4.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.4.update.sqlpp new file mode 100644 index 0000000..56aa839 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/simpleCase.4.update.sqlpp @@ -0,0 +1,25 @@ +/* + * 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 test; + +UPDATE UserTypes as u + SET u.age=32 + where userId=10; + diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.10.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.10.update.sqlpp new file mode 100644 index 0000000..a846fc0 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.10.update.sqlpp @@ -0,0 +1,26 @@ + +/* + * 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 test; + + +UPDATE UserTypes AS u +(INSERT INTO u.addresses AT 2([ +{"city": "Irvine, United States", "street" : "Second st","zipcode" : 98128}])) where u.userId= 11; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.11.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.11.query.sqlpp new file mode 100644 index 0000000..6801b96 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.11.query.sqlpp @@ -0,0 +1,27 @@ + +/* + * 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 test; + +Use test; + +select * +from UserTypes +where age =23; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.12.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.12.update.sqlpp new file mode 100644 index 0000000..99a95ce --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.12.update.sqlpp @@ -0,0 +1,26 @@ + +/* + * 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 test; + + +UPDATE UserTypes AS u +(DELETE FROM u.addresses AT number WHERE number IN [0,1]) +WHERE u.userId =11; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.13.query.sqlpp new file mode 100644 index 0000000..403df2d --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.13.query.sqlpp @@ -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 test; + +select * +from UserTypes; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.5.query.sqlpp new file mode 100644 index 0000000..ecf528a --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.5.query.sqlpp @@ -0,0 +1,25 @@ + +/* + * 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 test; + +select * +from UserTypes +where userId=10; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.6.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.6.update.sqlpp new file mode 100644 index 0000000..1759740 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.6.update.sqlpp @@ -0,0 +1,27 @@ + +/* + * 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 test; + +Use test; + +UPDATE UserTypes as u + SET u.timeZone="PT" + where userId=10; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.7.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.7.query.sqlpp new file mode 100644 index 0000000..e497093 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.7.query.sqlpp @@ -0,0 +1,26 @@ + +/* + * 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 test; + +Use test; + +select * +from UserTypes; \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.8.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.8.update.sqlpp new file mode 100644 index 0000000..9a2f994 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.8.update.sqlpp @@ -0,0 +1,27 @@ + +/* + * 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 test; + + +UPDATE UserTypes as u + SET u.totalcost=25 + SET u.totaltax= u.totalcost*1/100 + where u.age =23; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.9.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.9.query.sqlpp new file mode 100644 index 0000000..6801b96 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/update-statements/simpleCase/update.sqlpp.9.query.sqlpp @@ -0,0 +1,27 @@ + +/* + * 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 test; + +Use test; + +select * +from UserTypes +where age =23; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.11.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.11.adm new file mode 100644 index 0000000..128089c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.11.adm @@ -0,0 +1 @@ +{ "UserTypes": { "userId": 1, "email": "john....@example.com", "username": "johndoe", "isActive": true, "totaltax": 0.25, "totalcost": 25, "occupation": "teacher", "age": 23 } } \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.13.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.13.adm new file mode 100644 index 0000000..21b69a8 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.13.adm @@ -0,0 +1,11 @@ +{ "UserTypes": { "userId": 6, "email": "patricia.gar...@example.com", "username": "patriciag", "isActive": true, "age": "45" } } +{ "UserTypes": { "userId": 11, "email": "jack.mo...@example.com", "username": "jk", "isActive": true, "addresses": [ { "city": "Irvine, United States", "street": "Second st", "zipcode": 98128 }, { "city": "Riverside", "zipcode": 92507 } ], "age": "20", "occupation": "firefighter" } } +{ "UserTypes": { "userId": 1, "email": "john....@example.com", "username": "johndoe", "isActive": true, "totaltax": 0.25, "totalcost": 25, "occupation": "teacher", "age": 23 } } +{ "UserTypes": { "userId": 2, "email": "jane.sm...@example.com", "username": "janesmith", "isActive": false, "occupation": "firefighter" } } +{ "UserTypes": { "userId": 4, "email": "emily.da...@example.com", "username": "emilyd", "isActive": true, "age": 23.1 } } +{ "UserTypes": { "userId": 8, "email": "robert....@example.com", "username": "robertl", "isActive": true, "age": 31 } } +{ "UserTypes": { "userId": 9, "email": "james.wil...@example.com", "username": "jamesw", "isActive": true, "age": "65" } } +{ "UserTypes": { "userId": 10, "email": "mary.mo...@example.com", "username": "marym", "isActive": false, "timeZone": "PT", "age": 32, "addresses": [ { "city": "Riverside", "zipcode": 92510 } ] } } +{ "UserTypes": { "userId": 3, "email": "michael.br...@example.com", "username": "michaelb", "isActive": true, "age": "five", "occupation": 4 } } +{ "UserTypes": { "userId": 5, "email": "chris.jo...@example.com", "username": "chrisj", "isActive": false, "age": "old" } } +{ "UserTypes": { "userId": 7, "email": "linda.marti...@example.com", "username": "lindam", "isActive": false } } diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.5.adm new file mode 100644 index 0000000..129ca9e --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.5.adm @@ -0,0 +1 @@ +{ "UserTypes": { "userId": 10, "email": "mary.mo...@example.com", "username": "marym", "isActive": false, "age": 32, "addresses": [ { "city": "Riverside", "zipcode": 92510 } ] } } \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.7.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.7.adm new file mode 100644 index 0000000..22ff353 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.7.adm @@ -0,0 +1,11 @@ +{ "UserTypes": { "userId": 6, "email": "patricia.gar...@example.com", "username": "patriciag", "isActive": true, "age": "45" } } +{ "UserTypes": { "userId": 11, "email": "jack.mo...@example.com", "username": "jk", "isActive": true, "age": "20", "occupation": "firefighter", "addresses": [ { "city": "San Jose, United States", "street": "Santana Row", "zipcode": 95128 }, { "city": "Riverside", "zipcode": 92507 } ] } } +{ "UserTypes": { "userId": 1, "email": "john....@example.com", "username": "johndoe", "isActive": true, "occupation": "teacher", "age": 23 } } +{ "UserTypes": { "userId": 2, "email": "jane.sm...@example.com", "username": "janesmith", "isActive": false, "occupation": "firefighter" } } +{ "UserTypes": { "userId": 4, "email": "emily.da...@example.com", "username": "emilyd", "isActive": true, "age": 23.1 } } +{ "UserTypes": { "userId": 8, "email": "robert....@example.com", "username": "robertl", "isActive": true, "age": 31 } } +{ "UserTypes": { "userId": 9, "email": "james.wil...@example.com", "username": "jamesw", "isActive": true, "age": "65" } } +{ "UserTypes": { "userId": 10, "email": "mary.mo...@example.com", "username": "marym", "isActive": false, "timeZone": "PT", "age": 32, "addresses": [ { "city": "Riverside", "zipcode": 92510 } ] } } +{ "UserTypes": { "userId": 3, "email": "michael.br...@example.com", "username": "michaelb", "isActive": true, "age": "five", "occupation": 4 } } +{ "UserTypes": { "userId": 5, "email": "chris.jo...@example.com", "username": "chrisj", "isActive": false, "age": "old" } } +{ "UserTypes": { "userId": 7, "email": "linda.marti...@example.com", "username": "lindam", "isActive": false } } diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.9.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.9.adm new file mode 100644 index 0000000..128089c --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/update-statements/simpleCase/simpleCase.9.adm @@ -0,0 +1 @@ +{ "UserTypes": { "userId": 1, "email": "john....@example.com", "username": "johndoe", "isActive": true, "totaltax": 0.25, "totalcost": 25, "occupation": "teacher", "age": 23 } } \ No newline at end of file diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml index 1a4dd75..0f710c2 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml @@ -15372,7 +15372,16 @@ </compilation-unit> </test-case> </test-group> - <test-group name="json"> + + <test-group name="update-statements"> + <test-case FilePath="update-statements"> + <compilation-unit name="simpleCase"> + <output-dir compare="Text">simpleCase</output-dir> + </compilation-unit> + </test-case> + </test-group> + +<test-group name="json"> <test-case FilePath="json"> <compilation-unit name="int01"> <output-dir compare="Lossless-JSON">int01-losslessjson</output-dir> -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20368?usp=email To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I0d908fbf6ea084855157e6271fd0e58d61870d3c Gerrit-Change-Number: 20368 Gerrit-PatchSet: 1 Gerrit-Owner: Shahrzad Shirazi <shaji...@ucr.edu>