blob: 24d73e22c90d6d44196b47c76047f8db8eb37c2d [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 used by a channel
21 * Expected Res : Success
22 * Date : Mar 2015
23 */
24
25drop dataverse channels if exists;
26create dataverse channels;
Steven Glenn Jacobs55514042017-04-19 15:54:13 -070027use channels;
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -070028
29create type TweetMessageTypeuuid as closed {
30 tweetid: uuid,
Steven Glenn Jacobs55514042017-04-19 15:54:13 -070031 sender_location: point,
32 send_time: datetime,
33 referred_topics: {{ string }},
34 message_text: string,
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -070035 countA: int32,
36 countB: int32
37}
38
39
40create dataset TweetMessageuuids(TweetMessageTypeuuid)
41primary key tweetid autogenerated;
42
Steven Glenn Jacobs55514042017-04-19 15:54:13 -070043create function NearbyTweetsContainingText(place, text) {
44 (select m.message_text
45 from TweetMessageuuids m
46 where contains(m.message_text,text)
47 and spatial_intersect(m.sender_location, place))
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -070048};
49
Steven Glenn Jacobs55514042017-04-19 15:54:13 -070050write output to nc1:"rttest/channel-create.sqlpp";
Steven Glenn Jacobs409c3e72016-09-14 11:32:13 -070051
Steven Glenn Jacobs55514042017-04-19 15:54:13 -070052create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");