You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by sj...@apache.org on 2017/04/21 03:05:21 UTC

[2/3] asterixdb-bad git commit: Move BAD from AQL to SQL++

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.sqlpp
new file mode 100644
index 0000000..cde68a7
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.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 channels;
+
+select value x
+from Metadata.`Channel` result, Metadata.`Dataset` x
+where x.DatasetName = result.SubscriptionsDatasetName
+or x.DatasetName = result.ResultsDatasetName
+order by x.DatasetName

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
deleted file mode 100644
index 6234721..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Drop Channel Test. Check Metadata
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp
new file mode 100644
index 0000000..cd6db81
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.sqlpp
@@ -0,0 +1,55 @@
+/*
+ * 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  : Drop Channel Test. Check Metadata
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender_location: point,
+  send_time: datetime,
+  referred_topics: {{ string }},
+  message_text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText(place, text) {
+  (select m.message_text
+  from TweetMessageuuids m
+  where contains(m.message_text,text)
+  and spatial_intersect(m.sender_location, place))
+};
+
+create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
+
+create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
+
+create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql
deleted file mode 100644
index 3d3c206..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.aql
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-use dataverse channels;
-
-drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp
new file mode 100644
index 0000000..0eb7fe5
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.ddl.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * 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 channels;
+
+drop channel nearbyTweetChannel2;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
deleted file mode 100644
index e96ee38..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-use dataverse channels;
-
-for $result in dataset Metadata.Channel
-order by $result.ChannelName
-return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp
new file mode 100644
index 0000000..0728be0
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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 channels;
+
+select value x
+from Metadata.`Channel` x
+order by x.ChannelName;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql
deleted file mode 100644
index 7ed987e..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.aql
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type userLocation as {
-  userId: int,
-  roomNumber: int
-}
-create type watchedUser as {
-  userId: int,
-  name: string
-}
-create type roomSecurity as {
-  roomNumber: int,
-  securityGuardName: string,
-  securityGuardNumber: string 
-}
-
-create dataset watchedUsers(watchedUser)
-primary key userId;
-
-create dataset roomSecurityAssignments(roomSecurity)
-primary key roomNumber;
-
-upsert into dataset roomSecurityAssignments([
-{"roomNumber":123, "securityGuardName":"Mike", "securityGuardNumber":"555-4815"},
-{"roomNumber":222, "securityGuardName":"Steven", "securityGuardNumber":"555-1623"},
-{"roomNumber":350, "securityGuardName":"Vassilis", "securityGuardNumber":"555-1234"}]
-);
-
-upsert into dataset watchedUsers([
-{"userId":1, "name":"suspectNumber1"}]
-);
-
-
-create dataset UserLocations(userLocation)
-primary key userId;
-
-create function RoomOccupants($room) {
-    for $location in dataset UserLocations 
-    where $location.roomNumber = $room 
-    return $location.userId
-};
-
-create broker brokerA at "http://www.notifyA.com";
-create broker brokerB at "http://www.notifyB.com";
-
-
-create repetitive channel roomRecords using RoomOccupants@1 period duration("PT5S");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp
new file mode 100644
index 0000000..9febd43
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.1.ddl.sqlpp
@@ -0,0 +1,74 @@
+/*
+ * 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  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use channels;
+
+create type userLocation as {
+  userId: int,
+  roomNumber: int
+}
+create type watchedUser as {
+  userId: int,
+  name: string
+}
+create type roomSecurity as {
+  roomNumber: int,
+  securityGuardName: string,
+  securityGuardNumber: string
+}
+
+create dataset watchedUsers(watchedUser)
+primary key userId;
+
+create dataset roomSecurityAssignments(roomSecurity)
+primary key roomNumber;
+
+upsert into roomSecurityAssignments([
+{"roomNumber":123, "securityGuardName":"Mike", "securityGuardNumber":"555_4815"},
+{"roomNumber":222, "securityGuardName":"Steven", "securityGuardNumber":"555_1623"},
+{"roomNumber":350, "securityGuardName":"Vassilis", "securityGuardNumber":"555_1234"}]
+);
+
+upsert into watchedUsers([
+{"userId":1, "name":"suspectNumber1"}]
+);
+
+
+create dataset UserLocations(userLocation)
+primary key userId;
+
+create function RoomOccupants(room) {
+  (select location.userId
+  from UserLocations location
+  where location.roomNumber = room)
+};
+
+create broker brokerA at "http://www.notifyA.com";
+create broker brokerB at "http://www.notifyB.com";
+
+
+create repetitive channel roomRecords using RoomOccupants@1 period duration("PT5S");

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql
deleted file mode 100644
index 59a8678..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.aql
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-
-use dataverse channels;
-
-subscribe to roomRecords (123) on brokerA;
-subscribe to roomRecords (350) on brokerB;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp
new file mode 100644
index 0000000..3e2d5c0
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.2.update.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+
+use channels;
+
+subscribe to roomRecords (123) on brokerA;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql
deleted file mode 100644
index e564c35..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.query.aql
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-use dataverse channels;
-
-from $test in dataset roomRecordsSubscriptions
-order by $test.BrokerName
-select {
-"broker":$test.BrokerName,
-"parameter":$test.param0
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp
new file mode 100644
index 0000000..2e00f6a
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.3.update.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+
+use channels;
+
+subscribe to roomRecords (350) on brokerB;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp
new file mode 100644
index 0000000..de8d3e8
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+use channels;
+
+select test.BrokerName, test.param0
+from roomRecordsSubscriptions test
+order by test.BrokerName

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql
deleted file mode 100644
index 66d6a7d..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.4.update.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-
-use dataverse channels;
-
-
-upsert into dataset UserLocations([
-{"userId":1, "roomNumber":123},
-{"userId":2, "roomNumber":222},
-{"userId":3, "roomNumber":350}]
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql
deleted file mode 100644
index e90c028..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.sleep.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-5000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp
new file mode 100644
index 0000000..2499ac7
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.5.update.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+
+use channels;
+
+
+upsert into UserLocations([
+{"userId":1, "roomNumber":123},
+{"userId":2, "roomNumber":222},
+{"userId":3, "roomNumber":350}]
+);

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.sqlpp
new file mode 100644
index 0000000..b7bb951
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.sleep.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.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+5000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql
deleted file mode 100644
index 7875ec0..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.6.update.aql
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-use dataverse channels;
-
-upsert into dataset UserLocations([
-{"userId":1, "roomNumber":222},
-{"userId":2, "roomNumber":222},
-{"userId":3, "roomNumber":222}]
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql
deleted file mode 100644
index 45ed2d6..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.query.aql
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-use dataverse channels;
-
-from $result in dataset roomRecordsResults
-order by $result.result
-select $result.result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.update.sqlpp
new file mode 100644
index 0000000..eb7ee2e
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.7.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  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+use channels;
+
+upsert into UserLocations([
+{"userId":1, "roomNumber":222},
+{"userId":2, "roomNumber":222},
+{"userId":3, "roomNumber":222}]
+);

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp
new file mode 100644
index 0000000..1f9851f
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/room_occupants/room_occupants.8.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+use channels;
+
+select result.result.userId
+from roomRecordsResults result
+order by result.result.userId

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
deleted file mode 100644
index 652fb6a..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create broker brokerA at "http://www.notifyA.com";
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp
new file mode 100644
index 0000000..52942ba
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.sqlpp
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender_location: point,
+  send_time: datetime,
+  referred_topics: {{ string }},
+  message_text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText(place, text) {
+  (select m.message_text
+  from TweetMessageuuids m
+  where contains(m.message_text,text)
+  and spatial_intersect(m.sender_location, place))
+};
+
+create broker brokerA at "http://www.notifyA.com";
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
deleted file mode 100644
index 2af20cc..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-use dataverse channels;
-
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp
new file mode 100644
index 0000000..3917107
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * 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 channels;
+
+subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql
deleted file mode 100644
index 4f8f21e..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.aql
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-use dataverse channels;
-
-subscribe to nearbyTweetChannel (point("20.0, 20.0"), "Long") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp
new file mode 100644
index 0000000..8b813e6
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * 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 channels;
+
+subscribe to nearbyTweetChannel (point("20.0, 20.0"), "Long") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql
deleted file mode 100644
index 71c3e14..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.aql
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-use dataverse channels;
-
-subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp
new file mode 100644
index 0000000..c6cda12
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.4.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * 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 channels;
+
+subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper") on brokerA;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql
deleted file mode 100644
index 22bf97c..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.aql
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-use dataverse channels;
-
-for $test in dataset nearbyTweetChannelSubscriptions
-order by $test.param1
-return $test.param1;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp
new file mode 100644
index 0000000..ef6a39c
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.5.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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 channels;
+
+select value param1
+from nearbyTweetChannelSubscriptions
+order by param1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql
deleted file mode 100644
index e8f5d56..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.aql
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Long Term Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type userLocation as {
-  userId: int,
-  roomNumber: int
-}
-
-create dataset UserLocations(userLocation)
-primary key userId;
-
-create function RoomOccupants($room) {
-    for $location in dataset UserLocations
-    where $location.roomNumber = $room
-    return $location.userId
-};
-
-create broker brokerA at "http://www.notifyA.com";
-
-create repetitive channel roomRecords using RoomOccupants@1 period duration("PT1S");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/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
new file mode 100644
index 0000000..8b0b05c
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp
@@ -0,0 +1,46 @@
+/*
+ * 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  : Room Occupants Long Term Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use channels;
+
+create type userLocation as {
+  userId: int,
+  roomNumber: int
+}
+
+create dataset UserLocations(userLocation)
+primary key userId;
+
+create function RoomOccupants($room) {
+    for $location in dataset UserLocations
+    where $location.roomNumber = $room
+    return $location.userId
+};
+
+create broker brokerA at "http://www.notifyA.com";
+
+create repetitive channel roomRecords using RoomOccupants@1 period duration("PT1S");

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
deleted file mode 100644
index e253265..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.aql
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-
-use dataverse channels;
-
-subscribe to roomRecords (123) on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp
new file mode 100644
index 0000000..3e2d5c0
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.2.update.sqlpp
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+
+use channels;
+
+subscribe to roomRecords (123) on brokerA;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql
deleted file mode 100644
index 66d6a7d..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-
-use dataverse channels;
-
-
-upsert into dataset UserLocations([
-{"userId":1, "roomNumber":123},
-{"userId":2, "roomNumber":222},
-{"userId":3, "roomNumber":350}]
-);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp
new file mode 100644
index 0000000..2499ac7
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.3.update.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+
+use channels;
+
+
+upsert into UserLocations([
+{"userId":1, "roomNumber":123},
+{"userId":2, "roomNumber":222},
+{"userId":3, "roomNumber":350}]
+);

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
deleted file mode 100644
index 12bc053..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.aql
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-600000
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/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
new file mode 100644
index 0000000..270326b
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.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.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+600000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql
deleted file mode 100644
index 55e044b..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.aql
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Room Occupants Test
-* Expected Res : Success
-* Date         : Sep 2016
-* Author       : Steven Jacobs
-*/
-
-use dataverse channels;
-
-count (from $result in dataset roomRecordsResults
-order by $result.result
-select $result.result) > 599;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/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
new file mode 100644
index 0000000..8db3fde
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+* Description  : Room Occupants Test
+* Expected Res : Success
+* Date         : Sep 2016
+* Author       : Steven Jacobs
+*/
+
+use channels;
+
+count (from $result in dataset roomRecordsResults
+order by $result.result
+select $result.result) > 599;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql
deleted file mode 100644
index 712ad54..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.aql
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Simple Delete Procedure
-* Expected Res : Success
-* Date         : Jan 2017
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type myLocation as {
-  timeStamp: datetime,
-  roomNumber: int
-}
-
-
-create dataset UserLocations(myLocation)
-primary key timeStamp;
-
-insert into dataset UserLocations([
-  {"timeStamp":current-datetime(), "roomNumber":222}]
-);
-
-create procedure deleteAll() {
-delete $i from dataset UserLocations
-};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.1.ddl.sqlpp
new file mode 100644
index 0000000..face703
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.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 Delete Procedure
+* Expected Res : Success
+* Date         : Jan 2017
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use channels;
+
+create type myLocation as {
+  timeStamp: datetime,
+  roomNumber: int
+}
+
+
+create dataset UserLocations(myLocation)
+primary key timeStamp;
+
+insert into UserLocations([
+  {"timeStamp":current_datetime(), "roomNumber":222}]
+);
+
+create procedure deleteAll() {
+delete from UserLocations
+};

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql
deleted file mode 100644
index 16013d3..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.aql
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Simple Delete Procedure
-* Expected Res : Success
-* Date         : Jan 2017
-* Author       : Steven Jacobs
-*/
-
-use dataverse channels;
-count(for $i in dataset UserLocations
-return $i);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/55514040/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.sqlpp b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.2.query.sqlpp
new file mode 100644
index 0000000..c3a42ea
--- /dev/null
+++ b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.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
+* 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/55514040/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql b/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
deleted file mode 100644
index c02ee67..0000000
--- a/asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.aql
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*
-* Description  : Simple Delete Procedure
-* Expected Res : Success
-* Date         : Jan 2017
-* Author       : Steven Jacobs
-*/
-
-use dataverse channels;
-execute deleteAll();
\ No newline at end of file