blob: 039b5543fbbf5b0ee954b4947d2add090ae55b1b [file] [log] [blame]
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -07001/*
Steven Glenn Jacobs39826042017-03-28 20:28:27 -07002 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19/*
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -070020 * Description : Check the Plan for Unsubscribing to a channel
21 * Expected Res : Success
22 * Date : Mar 2015
23 */
24
Steven Glenn Jacobsd0ec8372016-12-07 11:00:08 -080025drop dataverse channels3 if exists;
26create dataverse channels3;
27use dataverse channels3;
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -070028
29
30create type TweetMessageTypeuuid as closed {
31 tweetid: uuid,
32 sender-location: point,
33 send-time: datetime,
34 referred-topics: {{ string }},
35 message-text: string,
36 countA: int32,
37 countB: int32
38}
39
40
41create dataset TweetMessageuuids(TweetMessageTypeuuid)
42primary key tweetid autogenerated;
43
44create function NearbyTweetsContainingText($location, $text) {
45 for $tweet in dataset TweetMessageuuids
46 let $circle := create-circle($location,30.0)
47 where contains($tweet.message-text,$text)
48 and spatial-intersect($tweet.sender-location, $location)
49 return $tweet.message-text
50};
51
52create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
53
54write output to nc1:"rttest/channel-unsubscribe.adm";
55
56unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;