Debian Codegraph @

test/command/suite/select/slices/command_version_3.expected

raw
1 plugin_register functions/time
2 [[0,0.0,0.0],true]
3 table_create Tags TABLE_PAT_KEY ShortText
4 [[0,0.0,0.0],true]
5 table_create Memos TABLE_HASH_KEY ShortText
6 [[0,0.0,0.0],true]
7 column_create Memos date COLUMN_SCALAR Time
8 [[0,0.0,0.0],true]
9 column_create Memos tag COLUMN_SCALAR Tags
10 [[0,0.0,0.0],true]
11 load --table Memos
12 [
13 {"_key": "Groonga is fast!", "date": "2016-05-19 12:00:00", "tag": "Groonga"},
14 {"_key": "Mroonga is fast!", "date": "2016-05-19 12:00:01", "tag": "Mroonga"},
15 {"_key": "Groonga sticker!", "date": "2016-05-20 12:00:02", "tag": "Groonga"},
16 {"_key": "Rroonga is fast!", "date": "2016-05-21 12:00:03", "tag": "Rroonga"}
17 ]
18 [[0,0.0,0.0],4]
19 select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].sort_keys 'date' --slices[groonga].output_columns '_key, date' --slices[groonga].columns[date_day].stage filtered --slices[groonga].columns[date_day].type Time --slices[groonga].columns[date_day].value 'time_classify_day(date)' --slices[groonga].drilldowns[day].keys 'date_day' --command_version 3
20 {
21 "header": {
22 "return_code": 0,
23 "start_time": 0.0,
24 "elapsed_time": 0.0
25 },
26 "body": {
27 "n_hits": 4,
28 "columns": [
29 {
30 "name": "_id",
31 "type": "UInt32"
32 },
33 {
34 "name": "_key",
35 "type": "ShortText"
36 },
37 {
38 "name": "date",
39 "type": "Time"
40 },
41 {
42 "name": "tag",
43 "type": "Tags"
44 }
45 ],
46 "records": [
47 [
48 1,
49 "Groonga is fast!",
50 1463626800.0,
51 "Groonga"
52 ],
53 [
54 2,
55 "Mroonga is fast!",
56 1463626801.0,
57 "Mroonga"
58 ],
59 [
60 3,
61 "Groonga sticker!",
62 1463713202.0,
63 "Groonga"
64 ],
65 [
66 4,
67 "Rroonga is fast!",
68 1463799603.0,
69 "Rroonga"
70 ]
71 ],
72 "slices": {
73 "groonga": {
74 "n_hits": 2,
75 "columns": [
76 {
77 "name": "_key",
78 "type": "ShortText"
79 },
80 {
81 "name": "date",
82 "type": "Time"
83 }
84 ],
85 "records": [
86 [
87 "Groonga is fast!",
88 1463626800.0
89 ],
90 [
91 "Groonga sticker!",
92 1463713202.0
93 ]
94 ],
95 "drilldowns": {
96 "day": {
97 "n_hits": 2,
98 "columns": [
99 {
100 "name": "_key",
101 "type": "Time"
102 },
103 {
104 "name": "_nsubrecs",
105 "type": "Int32"
106 }
107 ],
108 "records": [
109 [
110 1463583600.0,
111 1
112 ],
113 [
114 1463670000.0,
115 1
116 ]
117 ]
118 }
119 }
120 }
121 }
122 }
123 }