blob: 7cdec50833868df231f2b5b56593deac785c1a80 [file] [log] [blame]
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -07001/*
2 * Description : Check the Plan for Unsubscribing to a channel
3 * Expected Res : Success
4 * Date : Mar 2015
5 */
6
7drop dataverse channels if exists;
8create dataverse channels;
9use dataverse channels;
10
11
12create type TweetMessageTypeuuid as closed {
13 tweetid: uuid,
14 sender-location: point,
15 send-time: datetime,
16 referred-topics: {{ string }},
17 message-text: string,
18 countA: int32,
19 countB: int32
20}
21
22
23create dataset TweetMessageuuids(TweetMessageTypeuuid)
24primary key tweetid autogenerated;
25
26create function NearbyTweetsContainingText($location, $text) {
27 for $tweet in dataset TweetMessageuuids
28 let $circle := create-circle($location,30.0)
29 where contains($tweet.message-text,$text)
30 and spatial-intersect($tweet.sender-location, $location)
31 return $tweet.message-text
32};
33
34create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
35
36write output to nc1:"rttest/channel-unsubscribe.adm";
37
38unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;