Debian Codegraph @

test/command/suite/sharding/logical_select/cache/drilldowns/columns/window/group_keys.expected

raw
1 plugin_register sharding
2 [[0,0.0,0.0],true]
3 table_create Items TABLE_HASH_KEY ShortText
4 [[0,0.0,0.0],true]
5 column_create Items price COLUMN_SCALAR UInt32
6 [[0,0.0,0.0],true]
7 table_create Logs_20170415 TABLE_NO_KEY
8 [[0,0.0,0.0],true]
9 column_create Logs_20170415 timestamp COLUMN_SCALAR Time
10 [[0,0.0,0.0],true]
11 column_create Logs_20170415 item COLUMN_SCALAR Items
12 [[0,0.0,0.0],true]
13 column_create Logs_20170415 category COLUMN_SCALAR ShortText
14 [[0,0.0,0.0],true]
15 table_create Logs_20170416 TABLE_NO_KEY
16 [[0,0.0,0.0],true]
17 column_create Logs_20170416 timestamp COLUMN_SCALAR Time
18 [[0,0.0,0.0],true]
19 column_create Logs_20170416 item COLUMN_SCALAR Items
20 [[0,0.0,0.0],true]
21 column_create Logs_20170416 category COLUMN_SCALAR ShortText
22 [[0,0.0,0.0],true]
23 load --table Items
24 [
25 {"_key": "item1", "price": 200},
26 {"_key": "item2", "price": 100}
27 ]
28 [[0,0.0,0.0],2]
29 load --table Logs_20170415
30 [
31 {"timestamp": "2017/04/15 00:00:00", "item": "item1", "category": "Book"},
32 {"timestamp": "2017/04/15 01:00:00", "item": "item2", "category": "Pen"},
33 {"timestamp": "2017/04/15 02:00:00", "item": "item1", "category": "Pen"}
34 ]
35 [[0,0.0,0.0],3]
36 load --table Logs_20170416
37 [
38 {"timestamp": "2017/04/16 10:00:00", "item": "item2", "category": "Pen"},
39 {"timestamp": "2017/04/16 11:00:00", "item": "item1", "category": "Pen"},
40 {"timestamp": "2017/04/16 12:00:00", "item": "item1", "category": "Book"}
41 ]
42 [[0,0.0,0.0],3]
43 logical_select Logs --shard_key timestamp --limit 0 --output_columns _id --drilldowns[group].keys item,category --drilldowns[group].columns[nth].stage initial --drilldowns[group].columns[nth].type UInt32 --drilldowns[group].columns[nth].flags COLUMN_SCALAR --drilldowns[group].columns[nth].value 'window_record_number()' --drilldowns[group].columns[nth].window.group_keys _value.item --drilldowns[group].output_columns _value.item,nth
44 [
45 [
46 0,
47 0.0,
48 0.0
49 ],
50 [
51 [
52 [
53 6
54 ],
55 [
56 [
57 "_id",
58 "UInt32"
59 ]
60 ]
61 ],
62 {
63 "group": [
64 [
65 3
66 ],
67 [
68 [
69 "item",
70 "Items"
71 ],
72 [
73 "nth",
74 "UInt32"
75 ]
76 ],
77 [
78 "item1",
79 1
80 ],
81 [
82 "item2",
83 1
84 ],
85 [
86 "item1",
87 2
88 ]
89 ]
90 }
91 ]
92 ]
93 logical_select Logs --shard_key timestamp --limit 0 --output_columns _id --drilldowns[group].keys item,category --drilldowns[group].columns[nth].stage initial --drilldowns[group].columns[nth].type UInt32 --drilldowns[group].columns[nth].flags COLUMN_SCALAR --drilldowns[group].columns[nth].value 'window_record_number()' --drilldowns[group].columns[nth].window.group_keys _value.category --drilldowns[group].output_columns _value.item,nth
94 [
95 [
96 0,
97 0.0,
98 0.0
99 ],
100 [
101 [
102 [
103 6
104 ],
105 [
106 [
107 "_id",
108 "UInt32"
109 ]
110 ]
111 ],
112 {
113 "group": [
114 [
115 3
116 ],
117 [
118 [
119 "item",
120 "Items"
121 ],
122 [
123 "nth",
124 "UInt32"
125 ]
126 ],
127 [
128 "item1",
129 1
130 ],
131 [
132 "item2",
133 2
134 ],
135 [
136 "item1",
137 1
138 ]
139 ]
140 }
141 ]
142 ]