blob: 7e859af988daef5d71ec614ea1f9b1ea54a9d4d4 [file] [log] [blame]
buyingyia08c34d2012-12-21 07:50:17 +00001/*
2 * Description : This test case is to verify the fix for issue236
3 : https://code.google.com/p/asterixdb/issues/detail?id=236
4 * Expected Res : Success
5 * Date : 20 Dec. 2012
6 */
7
8drop dataverse SocialNetworkData if exists;
9
10create dataverse SocialNetworkData;
11use dataverse SocialNetworkData;
12
13create type TwitterUserType as open {
14screen-name: string,
15lang: string,
16friends_count: int32,
17statuses_count: int32,
18name: string,
19followers_count: int32
20}
21
22create type TweetMessageType as closed {
23tweetid: string,
24tweetid-copy: string,
25user: TwitterUserType,
26sender-location: point?,
27send-time: datetime,
28send-time-copy: datetime,
29referred-topics: {{ string }},
30message-text: string
31}
32
33create dataset TweetMessages(TweetMessageType)
ramangrover29669d8f62013-02-11 06:03:32 +000034primary key tweetid;
buyingyia08c34d2012-12-21 07:50:17 +000035
36
37insert into dataset TweetMessages(
38{
39"tweetid": "1111387810",
40"tweetid-copy": "1111387810",
41"user": { "screen-name": "TonyNapier#786", "lang": "en", "friends_count": 4241366,
42"statuses_count": 97, "name": "Tony Napier", "followers_count": 5984113 },
43"sender-location": point("29.24,78.35"),
44"send-time": datetime("2011-11-24T14:24:51.000Z"),
45"send-time-copy": datetime("2011-11-24T14:24:51.000Z"),
46"referred-topics": {{ "sprint", "wireless" }},
47"message-text": " love sprint its wireless is mind-blowing:)"
48});
49
50write output to nc1:"rttest/open-closed_query-issue236.adm";
51for $r in dataset('TweetMessages')
52return $r