Debian Codegraph @

test/command/suite/sharding/logical_select/drilldowns/sortby/offset.test

raw
1 #@on-error omit
2 plugin_register sharding
3 #@on-error default
4
5 table_create Logs_20150203 TABLE_NO_KEY
6 column_create Logs_20150203 timestamp COLUMN_SCALAR Time
7 column_create Logs_20150203 memo COLUMN_SCALAR ShortText
8 column_create Logs_20150203 date COLUMN_SCALAR ShortText
9 column_create Logs_20150203 action COLUMN_SCALAR ShortText
10
11 table_create Logs_20150204 TABLE_NO_KEY
12 column_create Logs_20150204 timestamp COLUMN_SCALAR Time
13 column_create Logs_20150204 memo COLUMN_SCALAR ShortText
14 column_create Logs_20150204 date COLUMN_SCALAR ShortText
15 column_create Logs_20150204 action COLUMN_SCALAR ShortText
16
17 table_create Logs_20150205 TABLE_NO_KEY
18 column_create Logs_20150205 timestamp COLUMN_SCALAR Time
19 column_create Logs_20150205 memo COLUMN_SCALAR ShortText
20 column_create Logs_20150205 date COLUMN_SCALAR ShortText
21 column_create Logs_20150205 action COLUMN_SCALAR ShortText
22
23 load --table Logs_20150203
24 [
25 {
26 "timestamp": "2015-02-03 12:49:00",
27 "memo": "2015-02-03 12:49:00",
28 "date": "2015-02-03",
29 "action": "Start"
30 },
31 {
32 "timestamp": "2015-02-03 23:59:59",
33 "memo": "2015-02-03 23:59:59",
34 "date": "2015-02-03",
35 "action": "Shutdown"
36 }
37 ]
38
39 load --table Logs_20150204
40 [
41 {
42 "timestamp": "2015-02-04 00:00:00",
43 "memo": "2015-02-04 00:00:00",
44 "date": "2015-02-04",
45 "action": "Start"
46 },
47 {
48 "timestamp": "2015-02-04 13:49:00",
49 "memo": "2015-02-04 13:49:00",
50 "date": "2015-02-04",
51 "action": "Restart"
52 },
53 {
54 "timestamp": "2015-02-04 13:50:00",
55 "memo": "2015-02-04 13:50:00",
56 "date": "2015-02-04",
57 "action": "Restart"
58 }
59 ]
60
61 load --table Logs_20150205
62 [
63 {
64 "timestamp": "2015-02-05 13:49:00",
65 "memo": "2015-02-05 13:49:00",
66 "date": "2015-02-05",
67 "action": "Restart"
68 },
69 {
70 "timestamp": "2015-02-05 13:50:00",
71 "memo": "2015-02-05 13:50:00",
72 "date": "2015-02-05",
73 "action": "Restart"
74 },
75 {
76 "timestamp": "2015-02-05 13:51:00",
77 "memo": "2015-02-05 13:51:00",
78 "date": "2015-02-05",
79 "action": "Restart"
80 },
81 {
82 "timestamp": "2015-02-05 13:52:00",
83 "memo": "2015-02-05 13:52:00",
84 "date": "2015-02-05",
85 "action": "Restart"
86 }
87 ]
88
89 logical_select Logs timestamp \
90 --limit 0 \
91 --drilldowns[action_date].keys action,date \
92 --drilldowns[action_date].output_columns _value.action,_value.date,_nsubrecs \
93 --drilldowns[action_date].sortby _nsubrecs \
94 --drilldowns[action_date].offset 1