Steven Glenn Jacobs | 409c3e7 | 2016-09-14 11:32:13 -0700 | [diff] [blame] | 1 | /* |
Steven Glenn Jacobs | 3982604 | 2017-03-28 20:28:27 -0700 | [diff] [blame] | 2 | * 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 Jacobs | 409c3e7 | 2016-09-14 11:32:13 -0700 | [diff] [blame] | 20 | * Description : Check the Plan for Unsubscribing to a channel |
| 21 | * Expected Res : Success |
| 22 | * Date : Mar 2015 |
| 23 | */ |
| 24 | |
Steven Glenn Jacobs | d0ec837 | 2016-12-07 11:00:08 -0800 | [diff] [blame] | 25 | drop dataverse channels3 if exists; |
| 26 | create dataverse channels3; |
| 27 | use dataverse channels3; |
Steven Glenn Jacobs | 409c3e7 | 2016-09-14 11:32:13 -0700 | [diff] [blame] | 28 | |
| 29 | |
| 30 | create 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 | |
| 41 | create dataset TweetMessageuuids(TweetMessageTypeuuid) |
| 42 | primary key tweetid autogenerated; |
| 43 | |
| 44 | create 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 | |
| 52 | create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M"); |
| 53 | |
| 54 | write output to nc1:"rttest/channel-unsubscribe.adm"; |
| 55 | |
| 56 | unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel; |