| 1 |
plugin_register sharding |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Logs_20150203 TABLE_NO_KEY |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Logs_20150203 timestamp COLUMN_SCALAR Time |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
table_create Logs_20150204 TABLE_NO_KEY |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Logs_20150204 timestamp COLUMN_SCALAR Time |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
table_create Logs TABLE_NO_KEY |
| 12 |
[[0,0.0,0.0],true] |
| 13 |
column_create Logs original_id COLUMN_SCALAR UInt32 |
| 14 |
[[0,0.0,0.0],true] |
| 15 |
column_create Logs timestamp_text COLUMN_SCALAR ShortText |
| 16 |
[[0,0.0,0.0],true] |
| 17 |
load --table Logs_20150203 |
| 18 |
[ |
| 19 |
{ |
| 20 |
"timestamp": "2015-02-03 10:49:00" |
| 21 |
}, |
| 22 |
{ |
| 23 |
"timestamp": "2015-02-03 12:49:00" |
| 24 |
} |
| 25 |
] |
| 26 |
[[0,0.0,0.0],2] |
| 27 |
load --table Logs_20150204 |
| 28 |
[ |
| 29 |
{ |
| 30 |
"timestamp": "2015-02-04 00:00:00" |
| 31 |
} |
| 32 |
] |
| 33 |
[[0,0.0,0.0],1] |
| 34 |
logical_select --logical_table Logs --shard_key timestamp --load_table Logs --load_columns "original_id, timestamp_text" --load_values "_id, timestamp" --limit 0 |
| 35 |
[[0,0.0,0.0],[[[3],[["_id","UInt32"],["timestamp","Time"]]]]] |
| 36 |
select --table Logs |
| 37 |
[ |
| 38 |
[ |
| 39 |
0, |
| 40 |
0.0, |
| 41 |
0.0 |
| 42 |
], |
| 43 |
[ |
| 44 |
[ |
| 45 |
[ |
| 46 |
3 |
| 47 |
], |
| 48 |
[ |
| 49 |
[ |
| 50 |
"_id", |
| 51 |
"UInt32" |
| 52 |
], |
| 53 |
[ |
| 54 |
"original_id", |
| 55 |
"UInt32" |
| 56 |
], |
| 57 |
[ |
| 58 |
"timestamp_text", |
| 59 |
"ShortText" |
| 60 |
] |
| 61 |
], |
| 62 |
[ |
| 63 |
1, |
| 64 |
1, |
| 65 |
"1422928140000000" |
| 66 |
], |
| 67 |
[ |
| 68 |
2, |
| 69 |
2, |
| 70 |
"1422935340000000" |
| 71 |
], |
| 72 |
[ |
| 73 |
3, |
| 74 |
1, |
| 75 |
"1422975600000000" |
| 76 |
] |
| 77 |
] |
| 78 |
] |
| 79 |
] |