buyingyi | a08c34d | 2012-12-21 07:50:17 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 8 | drop dataverse SocialNetworkData if exists; |
| 9 | |
| 10 | create dataverse SocialNetworkData; |
| 11 | use dataverse SocialNetworkData; |
| 12 | |
| 13 | create type TwitterUserType as open { |
| 14 | screen-name: string, |
| 15 | lang: string, |
| 16 | friends_count: int32, |
| 17 | statuses_count: int32, |
| 18 | name: string, |
| 19 | followers_count: int32 |
| 20 | } |
| 21 | |
| 22 | create type TweetMessageType as closed { |
| 23 | tweetid: string, |
| 24 | tweetid-copy: string, |
| 25 | user: TwitterUserType, |
| 26 | sender-location: point?, |
| 27 | send-time: datetime, |
| 28 | send-time-copy: datetime, |
| 29 | referred-topics: {{ string }}, |
| 30 | message-text: string |
| 31 | } |
| 32 | |
| 33 | create dataset TweetMessages(TweetMessageType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame] | 34 | primary key tweetid; |
buyingyi | a08c34d | 2012-12-21 07:50:17 +0000 | [diff] [blame] | 35 | |
| 36 | |
| 37 | insert 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 | |
| 50 | write output to nc1:"rttest/open-closed_query-issue236.adm"; |
| 51 | for $r in dataset('TweetMessages') |
| 52 | return $r |