Debian Codegraph @

test/command/suite/sharding/logical_count/cache/columns/initial.test

raw
1 #@on-error omit
2 plugin_register sharding
3 #@on-error default
4
5 table_create Logs_20170315 TABLE_NO_KEY
6 column_create Logs_20170315 timestamp COLUMN_SCALAR Time
7 column_create Logs_20170315 price COLUMN_SCALAR UInt32
8
9 load --table Logs_20170315
10 [
11 {"timestamp": "2017/03/15 00:00:00", "price": 1000},
12 {"timestamp": "2017/03/15 01:00:00", "price": 900},
13 {"timestamp": "2017/03/15 02:00:00", "price": 300}
14 ]
15
16 #@sleep 1
17
18 #@collect-query-log true
19 logical_count Logs \
20 --shard_key timestamp \
21 --columns[price_with_tax].stage initial \
22 --columns[price_with_tax].type UInt32 \
23 --columns[price_with_tax].flags COLUMN_SCALAR \
24 --columns[price_with_tax].value 'price * 1.08' \
25 --filter 'price_with_tax > 550'
26 logical_count Logs \
27 --shard_key timestamp \
28 --columns[price_with_tax].stage initial \
29 --columns[price_with_tax].type UInt32 \
30 --columns[price_with_tax].flags COLUMN_SCALAR \
31 --columns[price_with_tax].value 'price * 1.08' \
32 --filter 'price_with_tax > 550'
33 #@collect-query-log false