Repository: asterixdb-bad Updated Branches: refs/heads/master 1f36ec759 -> 8b53ce556
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/optimizerts/results/channel/channel-advanced.plan ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-advanced.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-advanced.plan new file mode 100644 index 0000000..907044b --- /dev/null +++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-advanced.plan @@ -0,0 +1,104 @@ +-- NOTIFY_BROKERS |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- PRE_CLUSTERED_GROUP_BY[$$76, $$channelExecutionTime] |PARTITIONED| + { + -- AGGREGATE |LOCAL| + -- NESTED_TUPLE_SOURCE |LOCAL| + } + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STABLE_SORT [$$76(ASC), $$channelExecutionTime(ASC)] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$76, $$channelExecutionTime] |PARTITIONED| + -- PRE_SORTED_DISTINCT_BY |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STABLE_SORT [$$51(ASC)] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$51] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- COMMIT |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- INDEX_INSERT_DELETE |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- INSERT_DELETE |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$47] |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- STREAM_SELECT |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- HYBRID_HASH_JOIN [$$61][$$60] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$61] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- HYBRID_HASH_JOIN [$$59, $$57][$$52, $$53] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$59, $$57] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| + -- ASSIGN |UNPARTITIONED| + -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$52, $$53] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$60] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- HYBRID_HASH_JOIN [$$54][$$70] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_SELECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- BTREE_SEARCH |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STABLE_SORT [$$80(ASC)] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- BTREE_SEARCH |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$70] |PARTITIONED| + -- NESTED_LOOP |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- STREAM_SELECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- BTREE_SEARCH |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STABLE_SORT [$$84(ASC)] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- BTREE_SEARCH |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- STREAM_SELECT |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- BTREE_SEARCH |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STABLE_SORT [$$87(ASC)] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- BTREE_SEARCH |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan index 65e7dbc..a352739 100644 --- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan +++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan @@ -16,42 +16,46 @@ -- COMMIT |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- INSERT_DELETE |PARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| + -- INDEX_INSERT_DELETE |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- INSERT_DELETE |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED| -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- NESTED_LOOP |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED| + -- NESTED_LOOP |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- BROADCAST_EXCHANGE |PARTITIONED| - -- ASSIGN |UNPARTITIONED| - -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| + -- ASSIGN |UNPARTITIONED| + -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ASSIGN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- EMPTY_TUPLE_SOURCE |PARTITIONED| - -- BROADCAST_EXCHANGE |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- EMPTY_TUPLE_SOURCE |PARTITIONED| \ No newline at end of file + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan index 06630e6..7ad21f6 100644 --- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan +++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan @@ -16,45 +16,49 @@ -- COMMIT |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- INSERT_DELETE |PARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| + -- INDEX_INSERT_DELETE |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- INSERT_DELETE |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED| -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- NESTED_LOOP |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED| + -- NESTED_LOOP |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- BROADCAST_EXCHANGE |PARTITIONED| - -- ASSIGN |UNPARTITIONED| - -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| + -- ASSIGN |UNPARTITIONED| + -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ASSIGN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- EMPTY_TUPLE_SOURCE |PARTITIONED| - -- BROADCAST_EXCHANGE |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| -- DISTRIBUTE_RESULT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan index b3f4c51..3338e79 100644 --- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan +++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan @@ -16,45 +16,49 @@ -- COMMIT |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- INSERT_DELETE |PARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| + -- INDEX_INSERT_DELETE |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- INSERT_DELETE |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$32] |PARTITIONED| -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- NESTED_LOOP |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED| + -- NESTED_LOOP |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- BROADCAST_EXCHANGE |PARTITIONED| - -- ASSIGN |UNPARTITIONED| - -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| - -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- HYBRID_HASH_JOIN [$$44, $$42][$$38, $$39] |PARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$44, $$42] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| + -- ASSIGN |UNPARTITIONED| + -- EMPTY_TUPLE_SOURCE |UNPARTITIONED| + -- HASH_PARTITION_EXCHANGE [$$38, $$39] |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ASSIGN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- BROADCAST_EXCHANGE |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ASSIGN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- EMPTY_TUPLE_SOURCE |PARTITIONED| - -- BROADCAST_EXCHANGE |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ASSIGN |PARTITIONED| - -- STREAM_PROJECT |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- DATASOURCE_SCAN |PARTITIONED| - -- ONE_TO_ONE_EXCHANGE |PARTITIONED| - -- EMPTY_TUPLE_SOURCE |PARTITIONED| + -- STREAM_PROJECT |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- DATASOURCE_SCAN |PARTITIONED| + -- ONE_TO_ONE_EXCHANGE |PARTITIONED| + -- EMPTY_TUPLE_SOURCE |PARTITIONED| -- COMMIT |PARTITIONED| -- STREAM_PROJECT |PARTITIONED| -- ONE_TO_ONE_EXCHANGE |PARTITIONED| http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.1.ddl.sqlpp new file mode 100644 index 0000000..e8d57a6 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.1.ddl.sqlpp @@ -0,0 +1,70 @@ +/* + * 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 : Disasters with friends +* Expected Res : Success +* Date : May 17 +* Author : Steven Jacobs +*/ + +drop dataverse channels if exists; +create dataverse channels; +use channels; + +create type UserLocation as { + recordId: uuid, + latitude: double, + longitude: double, + user_id: int, + timestamp: datetime +}; + +create type EmergencyShelter as { + name: string, + location: point +}; + +create type EmergencyReport as { + reportId: uuid, + impactZone: circle, + timestamp: datetime, + emergencyType: string +}; + +//create datasets +create dataset EmergencyReports(EmergencyReport) primary key reportId autogenerated; +create dataset UserLocations(UserLocation) primary key recordId autogenerated; +create dataset EmergencyShelters(EmergencyShelter) primary key name; + +create broker brokerA at "http://www.notifyA.com"; + +create function EmergenciesNearMe(emergencyType, uid){ + (with tenMinutesAgo as current_datetime() - day_time_duration("PT10S") + select report as report, shelters as shelters + from EmergencyReports report, UserLocations user + let shelters = (select * from EmergencyShelters shelter + where spatial_intersect(report.impactZone,shelter.location)) + where user.user_id = uid + and report.timestamp >= tenMinutesAgo + and user.timestamp >= tenMinutesAgo + and report.emergencyType = emergencyType + and spatial_intersect(report.impactZone,create_point(user.latitude,user.longitude))) +}; + +create repetitive channel EmergenciesNearMeChannel using EmergenciesNearMe@2 period duration("PT5S"); http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.2.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.2.update.sqlpp new file mode 100644 index 0000000..b1a132b --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.2.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. + */ +/* +* Description : Disasters with friends +* Expected Res : Success +* Date : May 17 +* Author : Steven Jacobs +*/ +use channels; + +subscribe to EmergenciesNearMeChannel("tornado", 1) on brokerA; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.3.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.3.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.3.update.sqlpp new file mode 100644 index 0000000..292151e --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.3.update.sqlpp @@ -0,0 +1,41 @@ +/* + * 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 : Disasters with friends +* Expected Res : Success +* Date : May 17 +* Author : Steven Jacobs +*/ + +use channels; +upsert into UserLocations([ +{"user_id":1, "latitude":5, "longitude":5, "timestamp":current_datetime()}, +{"user_id":2, "latitude":10, "longitude":10, "timestamp":current_datetime()}, +{"user_id":3, "latitude":15, "longitude":15, "timestamp":current_datetime()}] +); +upsert into EmergencyShelters([ +{"name":"A", "location":create_point(5.0,5.0)}, +{"name":"B", "location":create_point(10.0,10.0)}, +{"name":"C", "location":create_point(15.0,15.0)}] +); +upsert into EmergencyReports([ +{"emergencyType":"tornado", "impactZone":create_circle(create_point(5.0,6.0), 10.0), "timestamp":current_datetime()}, +{"emergencyType":"flood", "impactZone":create_circle(create_point(5.0,6.0), 5.0), "timestamp":current_datetime()}, +{"emergencyType":"tornado", "impactZone":create_circle(create_point(30.0,70.0), 5.0), "timestamp":current_datetime()}] +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.4.sleep.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.4.sleep.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.4.sleep.sqlpp new file mode 100644 index 0000000..67c5efa --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.4.sleep.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. + */ +/* +* Description : Disasters with friends +* Expected Res : Success +* Date : May 17 +* Author : Steven Jacobs +*/ + +5000 http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.5.query.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.5.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.5.query.sqlpp new file mode 100644 index 0000000..2fbd21d --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.5.query.sqlpp @@ -0,0 +1,28 @@ +/* + * 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 : Disasters with friends +* Expected Res : Success +* Date : May 17 +* Author : Steven Jacobs +*/ + +use channels; +select value array_count (result.result.shelters) +from EmergenciesNearMeChannelResults result; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.6.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.6.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.6.ddl.sqlpp new file mode 100644 index 0000000..220f05a --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/disasters_with_friends/disasters_with_friends.6.ddl.sqlpp @@ -0,0 +1,28 @@ +/* + * 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 : Disasters with friends +* Expected Res : Success +* Date : May 17 +* Author : Steven Jacobs +*/ + +use channels; + +drop channel EmergenciesNearMeChannel; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp index 42fd4aa..11b7b33 100644 --- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp @@ -35,12 +35,12 @@ create type userLocation as { create dataset UserLocations(userLocation) primary key userId; -create function RoomOccupants($room) { - for $location in dataset UserLocations - where $location.roomNumber = $room - return $location.userId +create function RoomOccupants(room) { + (select location.userId + from UserLocations location + where location.roomNumber = room) }; create broker brokerA at "http://www.notifyA.com"; -create repetitive channel roomRecords using RoomOccupants@1 period duration("PT1S"); +create repetitive channel roomRecords using RoomOccupants@1 period duration("PT30S"); http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp index 270326b..d5f4290 100644 --- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp @@ -22,4 +22,4 @@ * Date : Sep 2016 * Author : Steven Jacobs */ -600000 +630000 http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp index 8db3fde..cfe92c9 100644 --- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp +++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp @@ -25,6 +25,4 @@ use channels; -count (from $result in dataset roomRecordsResults -order by $result.result -select $result.result) > 599; +(select value count(result) from roomRecordsResults)[0] > 19; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.1.ddl.sqlpp new file mode 100644 index 0000000..06ca3d5 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.1.ddl.sqlpp @@ -0,0 +1,44 @@ +/* + * 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 : Run Procedure Concurrently +* Expected Res : Success +* Date : Oct 2017 +* Author : Steven Jacobs +*/ + +drop dataverse channels if exists; +create dataverse channels; +use channels; + +create type myLocation as { + id : uuid, + timeStamp: datetime, + roomNumber: int +}; + + +create dataset UserLocations(myLocation) +primary key id autogenerated; + +create procedure addMe() { + insert into UserLocations([ + {"timeStamp":current_datetime(), "roomNumber":222}] + ) +}; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.2.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.2.update.sqlpp new file mode 100644 index 0000000..ac88f47 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.2.update.sqlpp @@ -0,0 +1,32 @@ +/* + * 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 : Simple Insert Procedure +* Expected Res : Success +* Date : Jan 2017 +* Author : Steven Jacobs +*/ + +use channels; +execute addMe(); +execute addMe(); +execute addMe(); +execute addMe(); +execute addMe(); +execute addMe(); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.3.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.3.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.3.ddl.sqlpp new file mode 100644 index 0000000..5ed56cf --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.3.ddl.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. + */ +/* +* Description : Simple Insert Procedure +* Expected Res : 3 +* Date : Jan 2017 +* Author : Steven Jacobs +*/ + +use channels; +drop procedure addMe@0; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.4.query.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.4.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.4.query.sqlpp new file mode 100644 index 0000000..2094a77 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.4.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. + */ +/* +* Description : Simple Insert Procedure +* Expected Res : Success +* Date : Jan 2017 +* Author : Steven Jacobs +*/ + +use channels; +select value count(location) from UserLocations location; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.ddl.sqlpp new file mode 100644 index 0000000..42b0d40 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.ddl.sqlpp @@ -0,0 +1,44 @@ +/* + * 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 : Simple Delete Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +drop dataverse channels if exists; +create dataverse channels; +use channels; +create type myLocation as { + id: int +}; +create dataset UserLocations(myLocation) +primary key id; +insert into UserLocations( + [{"id":0, "roomNumber":4815162342}, + {"id":1, "roomNumber":"lost"}, + {"id":2, "roomNumber":108}, + {"id":3, "roomNumber":"jacob"}] +); +create procedure deleteSome(r, otherRoom) { +delete from UserLocations +where roomNumber = r +or roomNumber = otherRoom +}; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.query.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.query.sqlpp new file mode 100644 index 0000000..88166bb --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.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. + */ +/* +* Description : Simple Delete Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +use channels; +select value count(roomNumber) from UserLocations; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.3.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.3.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.3.update.sqlpp new file mode 100644 index 0000000..8d03794 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.3.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. + */ +/* +* Description : Simple Delete Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +use channels; +execute deleteSome(108,"jacob"); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.4.query.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.4.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.4.query.sqlpp new file mode 100644 index 0000000..88166bb --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.4.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. + */ +/* +* Description : Simple Delete Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +use channels; +select value count(roomNumber) from UserLocations; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.ddl.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.ddl.sqlpp new file mode 100644 index 0000000..8949a4a --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.ddl.sqlpp @@ -0,0 +1,45 @@ +/* + * 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 : Simple Query Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +drop dataverse channels if exists; +create dataverse channels; +use channels; +create type myLocation as { + id: int +}; +create dataset UserLocations(myLocation) +primary key id; +insert into UserLocations( + [{"id":0, "roomNumber":4815162342}, + {"id":1, "roomNumber":"lost"}, + {"id":2, "roomNumber":108}, + {"id":3, "roomNumber":"jacob"}] +); +create procedure selectSome(r, otherRoom) { +select roomNumber from UserLocations +where roomNumber = r +or roomNumber = otherRoom +order by id +}; http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.update.sqlpp new file mode 100644 index 0000000..aa0722a --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.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. + */ +/* +* Description : Simple Query Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +use channels; +execute selectSome(108,"jacob"); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.3.update.sqlpp ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.3.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.3.update.sqlpp new file mode 100644 index 0000000..aa0722a --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/query_procedure_with_parameters/query_procedure_with_parameters.3.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. + */ +/* +* Description : Simple Query Procedure with parameters +* Expected Res : Success +* Date : May 2017 +* Author : Steven Jacobs +*/ + +use channels; +execute selectSome(108,"jacob"); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/results/channel/disasters_with_friends/disasters_with_friends.1.adm ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/results/channel/disasters_with_friends/disasters_with_friends.1.adm b/asterix-bad/src/test/resources/runtimets/results/channel/disasters_with_friends/disasters_with_friends.1.adm new file mode 100644 index 0000000..d8263ee --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/results/channel/disasters_with_friends/disasters_with_friends.1.adm @@ -0,0 +1 @@ +2 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/results/procedure/concurrent_procedure/concurrent_procedure.4.adm ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/results/procedure/concurrent_procedure/concurrent_procedure.4.adm b/asterix-bad/src/test/resources/runtimets/results/procedure/concurrent_procedure/concurrent_procedure.4.adm new file mode 100644 index 0000000..62f9457 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/results/procedure/concurrent_procedure/concurrent_procedure.4.adm @@ -0,0 +1 @@ +6 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.adm ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.adm b/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.adm new file mode 100644 index 0000000..bf0d87a --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.1.adm @@ -0,0 +1 @@ +4 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.adm ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.adm b/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.adm new file mode 100644 index 0000000..d8263ee --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/results/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.2.adm @@ -0,0 +1 @@ +2 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.adm ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.adm b/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.adm new file mode 100644 index 0000000..bee5525 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.1.adm @@ -0,0 +1,2 @@ +{ "roomNumber": 108 } +{ "roomNumber": "jacob" } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.adm ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.adm b/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.adm new file mode 100644 index 0000000..bee5525 --- /dev/null +++ b/asterix-bad/src/test/resources/runtimets/results/procedure/query_procedure_with_parameters/query_procedure_with_parameters.2.adm @@ -0,0 +1,2 @@ +{ "roomNumber": 108 } +{ "roomNumber": "jacob" } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/8b53ce55/asterix-bad/src/test/resources/runtimets/testsuite.xml ---------------------------------------------------------------------- diff --git a/asterix-bad/src/test/resources/runtimets/testsuite.xml b/asterix-bad/src/test/resources/runtimets/testsuite.xml index 12d7d55..1b2844b 100644 --- a/asterix-bad/src/test/resources/runtimets/testsuite.xml +++ b/asterix-bad/src/test/resources/runtimets/testsuite.xml @@ -21,60 +21,80 @@ QueryOffsetPath="queries" QueryFileExtension=".sqlpp"> <test-group name="channel"> - <test-case FilePath="channel"> - <compilation-unit name="room_occupants"> - <output-dir compare="Text">room_occupants</output-dir> - </compilation-unit> + <test-case FilePath="procedure"> + <compilation-unit name="delete_procedure"> + <output-dir compare="Text">delete_procedure</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="procedure"> + <compilation-unit name="delete_procedure_with_parameters"> + <output-dir compare="Text">delete_procedure_with_parameters</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="procedure"> + <compilation-unit name="query_procedure"> + <output-dir compare="Text">query_procedure</output-dir> + </compilation-unit> </test-case> <test-case FilePath="procedure"> - <compilation-unit name="insert_procedure"> - <output-dir compare="Text">insert_procedure</output-dir> - </compilation-unit> + <compilation-unit name="query_procedure_with_parameters"> + <output-dir compare="Text">query_procedure_with_parameters</output-dir> + </compilation-unit> </test-case> <test-case FilePath="procedure"> - <compilation-unit name="delete_procedure"> - <output-dir compare="Text">delete_procedure</output-dir> - </compilation-unit> + <compilation-unit name="insert_procedure"> + <output-dir compare="Text">insert_procedure</output-dir> + </compilation-unit> </test-case> <test-case FilePath="procedure"> - <compilation-unit name="query_procedure"> - <output-dir compare="Text">query_procedure</output-dir> - </compilation-unit> + <compilation-unit name="concurrent_procedure"> + <output-dir compare="Text">concurrent_procedure</output-dir> + </compilation-unit> </test-case> <test-case FilePath="procedure"> - <compilation-unit name="repetitive_insert_procedure"> - <output-dir compare="Text">repetitive_insert_procedure</output-dir> - </compilation-unit> + <compilation-unit name="repetitive_insert_procedure"> + <output-dir compare="Text">repetitive_insert_procedure</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="channel"> + <compilation-unit name="room_occupants"> + <output-dir compare="Text">room_occupants</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="channel"> + <compilation-unit name="create_channel_check_datasets"> + <output-dir compare="Text">create_channel_check_datasets</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="channel"> + <compilation-unit name="create_channel_check_metadata"> + <output-dir compare="Text">create_channel_check_metadata</output-dir> + </compilation-unit> </test-case> <test-case FilePath="channel"> - <compilation-unit name="create_channel_check_datasets"> - <output-dir compare="Text">create_channel_check_datasets</output-dir> - </compilation-unit> + <compilation-unit name="drop_channel_check_datasets"> + <output-dir compare="Text">drop_channel_check_datasets</output-dir> + </compilation-unit> </test-case> <test-case FilePath="channel"> - <compilation-unit name="create_channel_check_metadata"> - <output-dir compare="Text">create_channel_check_metadata</output-dir> - </compilation-unit> + <compilation-unit name="drop_channel_check_metadata"> + <output-dir compare="Text">drop_channel_check_metadata</output-dir> + </compilation-unit> </test-case> <test-case FilePath="channel"> - <compilation-unit name="drop_channel_check_datasets"> - <output-dir compare="Text">drop_channel_check_datasets</output-dir> - </compilation-unit> + <compilation-unit name="subscribe_channel_check_subscriptions"> + <output-dir compare="Text">subscribe_channel_check_subscriptions</output-dir> + </compilation-unit> </test-case> <test-case FilePath="channel"> - <compilation-unit name="drop_channel_check_metadata"> - <output-dir compare="Text">drop_channel_check_metadata</output-dir> - </compilation-unit> + <compilation-unit name="disasters_with_friends"> + <output-dir compare="Text">disasters_with_friends</output-dir> + </compilation-unit> </test-case> <test-case FilePath="channel"> - <compilation-unit name="subscribe_channel_check_subscriptions"> - <output-dir compare="Text">subscribe_channel_check_subscriptions</output-dir> - </compilation-unit> + <compilation-unit name="ten_minute_channel"> + <output-dir compare="Text">ten_minute_channel</output-dir> + </compilation-unit> </test-case> - <!-- <test-case FilePath="channel"> - <compilation-unit name="ten_minute_channel"> - <output-dir compare="Text">ten_minute_channel</output-dir> - </compilation-unit> - </test-case> --> </test-group> </test-suite>
