| 1 |
plugin_register sharding |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
plugin_register functions/vector |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
table_create Items TABLE_HASH_KEY ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Items price COLUMN_SCALAR UInt32 |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
table_create Logs_20170315 TABLE_NO_KEY |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
column_create Logs_20170315 timestamp COLUMN_SCALAR Time |
| 12 |
[[0,0.0,0.0],true] |
| 13 |
column_create Logs_20170315 items COLUMN_VECTOR Items |
| 14 |
[[0,0.0,0.0],true] |
| 15 |
table_create Logs_20170316 TABLE_NO_KEY |
| 16 |
[[0,0.0,0.0],true] |
| 17 |
column_create Logs_20170316 timestamp COLUMN_SCALAR Time |
| 18 |
[[0,0.0,0.0],true] |
| 19 |
column_create Logs_20170316 items COLUMN_VECTOR Items |
| 20 |
[[0,0.0,0.0],true] |
| 21 |
table_create Logs_20170317 TABLE_NO_KEY |
| 22 |
[[0,0.0,0.0],true] |
| 23 |
column_create Logs_20170317 timestamp COLUMN_SCALAR Time |
| 24 |
[[0,0.0,0.0],true] |
| 25 |
column_create Logs_20170317 items COLUMN_VECTOR Items |
| 26 |
[[0,0.0,0.0],true] |
| 27 |
load --table Items |
| 28 |
[ |
| 29 |
{"_key": "Book", "price": 1000}, |
| 30 |
{"_key": "Note", "price": 1000}, |
| 31 |
{"_key": "Box", "price": 500}, |
| 32 |
{"_key": "Pen", "price": 500}, |
| 33 |
{"_key": "Food", "price": 500}, |
| 34 |
{"_key": "Drink", "price": 300} |
| 35 |
] |
| 36 |
[[0,0.0,0.0],6] |
| 37 |
load --table Logs_20170315 |
| 38 |
[ |
| 39 |
{"timestamp": "2017/03/15 00:00:00", "items": ["Book", "Note", "Box", "Pen"]}, |
| 40 |
{"timestamp": "2017/03/15 01:00:00", "items": ["Food", "Drink", "Pen"]} |
| 41 |
] |
| 42 |
[[0,0.0,0.0],2] |
| 43 |
load --table Logs_20170316 |
| 44 |
[ |
| 45 |
{"timestamp": "2017/03/16 10:00:00", "items": ["Pen", "Note", "Food", "Drink"]}, |
| 46 |
{"timestamp": "2017/03/16 11:00:00", "items": ["Note", "Box"]} |
| 47 |
] |
| 48 |
[[0,0.0,0.0],2] |
| 49 |
load --table Logs_20170317 |
| 50 |
[ |
| 51 |
{"timestamp": "2017/03/17 20:00:00", "items": ["Food", "Book"]}, |
| 52 |
{"timestamp": "2017/03/17 20:00:00", "items": ["Drink", "Note"]} |
| 53 |
] |
| 54 |
[[0,0.0,0.0],2] |
| 55 |
logical_select Logs --shard_key timestamp --output_columns _id --limit 0 --drilldowns[item].keys items --drilldowns[item].sort_keys price --drilldowns[item].columns[price_with_tax].stage initial --drilldowns[item].columns[price_with_tax].type ShortText --drilldowns[item].columns[price_with_tax].flags COLUMN_VECTOR --drilldowns[item].columns[price_with_tax].value 'vector_new()' --drilldowns[item].output_columns _key,price_with_tax |
| 56 |
[ |
| 57 |
[ |
| 58 |
0, |
| 59 |
0.0, |
| 60 |
0.0 |
| 61 |
], |
| 62 |
[ |
| 63 |
[ |
| 64 |
[ |
| 65 |
6 |
| 66 |
], |
| 67 |
[ |
| 68 |
[ |
| 69 |
"_id", |
| 70 |
"UInt32" |
| 71 |
] |
| 72 |
] |
| 73 |
], |
| 74 |
{ |
| 75 |
"item": [ |
| 76 |
[ |
| 77 |
6 |
| 78 |
], |
| 79 |
[ |
| 80 |
[ |
| 81 |
"_key", |
| 82 |
"ShortText" |
| 83 |
], |
| 84 |
[ |
| 85 |
"price_with_tax", |
| 86 |
"ShortText" |
| 87 |
] |
| 88 |
], |
| 89 |
[ |
| 90 |
"Drink", |
| 91 |
[] |
| 92 |
], |
| 93 |
[ |
| 94 |
"Food", |
| 95 |
[] |
| 96 |
], |
| 97 |
[ |
| 98 |
"Pen", |
| 99 |
[] |
| 100 |
], |
| 101 |
[ |
| 102 |
"Box", |
| 103 |
[] |
| 104 |
], |
| 105 |
[ |
| 106 |
"Book", |
| 107 |
[] |
| 108 |
], |
| 109 |
[ |
| 110 |
"Note", |
| 111 |
[] |
| 112 |
] |
| 113 |
] |
| 114 |
} |
| 115 |
] |
| 116 |
] |
| 117 |
logical_select Logs --shard_key timestamp --output_columns _id --limit 0 --drilldowns[item].keys items --drilldowns[item].sort_keys price --drilldowns[item].columns[price_with_tax].stage initial --drilldowns[item].columns[price_with_tax].type ShortText --drilldowns[item].columns[price_with_tax].flags COLUMN_VECTOR|WITH_WEIGHT --drilldowns[item].columns[price_with_tax].value 'vector_new()' --drilldowns[item].output_columns _key,price_with_tax |
| 118 |
[ |
| 119 |
[ |
| 120 |
0, |
| 121 |
0.0, |
| 122 |
0.0 |
| 123 |
], |
| 124 |
[ |
| 125 |
[ |
| 126 |
[ |
| 127 |
6 |
| 128 |
], |
| 129 |
[ |
| 130 |
[ |
| 131 |
"_id", |
| 132 |
"UInt32" |
| 133 |
] |
| 134 |
] |
| 135 |
], |
| 136 |
{ |
| 137 |
"item": [ |
| 138 |
[ |
| 139 |
6 |
| 140 |
], |
| 141 |
[ |
| 142 |
[ |
| 143 |
"_key", |
| 144 |
"ShortText" |
| 145 |
], |
| 146 |
[ |
| 147 |
"price_with_tax", |
| 148 |
"ShortText" |
| 149 |
] |
| 150 |
], |
| 151 |
[ |
| 152 |
"Drink", |
| 153 |
{} |
| 154 |
], |
| 155 |
[ |
| 156 |
"Food", |
| 157 |
{} |
| 158 |
], |
| 159 |
[ |
| 160 |
"Pen", |
| 161 |
{} |
| 162 |
], |
| 163 |
[ |
| 164 |
"Box", |
| 165 |
{} |
| 166 |
], |
| 167 |
[ |
| 168 |
"Book", |
| 169 |
{} |
| 170 |
], |
| 171 |
[ |
| 172 |
"Note", |
| 173 |
{} |
| 174 |
] |
| 175 |
] |
| 176 |
} |
| 177 |
] |
| 178 |
] |