Skip to content

Commit 0c69f01

Browse files
authored
add footprint case (apache#73)
* add footprint case
1 parent da53d29 commit 0c69f01

4 files changed

Lines changed: 212 additions & 0 deletions

File tree

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
-- This file is automatically generated. You should know what you did if you want to edit this
2+
-- !q01 --
3+
0
4+
5+
-- !q01_2 --
6+
0x0000000000000000000000000000000000000000 840506
7+
0x3af4788ade7a75b90c0d8f59017f3ef56b51b84e 357000
8+
0xbd1eab0976df35a5a515b78e2bc6b44458f0c838 304127
9+
0xa5db65d218d9a017c39c0657c0663fee0085a5c2 291239
10+
0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43 192501
11+
0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae 158111
12+
0xab5801a7d398351b8be11c439e05c5b3259aec9b 140650
13+
0xff6c307226343fcf96af2f6b5b05f63f717e68cb 140151
14+
0x00b8bd6d6f3964418d8b03245ac4a86a208dd3bc 138645
15+
0xefa1c8c9409efc3c46b3625e998860439998557d 113368
16+
0x23581767a106ae21c074b2276d25e5c3e136a68b 112001
17+
0x330e7b7f5af6a0d3778a8354e80b8c23976da935 104123
18+
0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce 96699
19+
0x9d551f41fed6fc27b719777c224dfecce170004d 95181
20+
0x59728544b08ab483533076417fbbb2fd0b17ce3a 92837
21+
0xc36442b4a4522e871399cd717abdd847ab11fe88 90914
22+
0xa27f25d6a8f876c8cdd506f6cc59f3166f2a494f 82504
23+
0xec5ee3714a9c0be3def303136391011f604284e2 79174
24+
0xe56df19db77c4f96006faf06f94beda3946918cb 78637
25+
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 77653
26+
0x904b32e0d55b2de8ec68e874f68121b1f9e0fc57 76834
27+
0x74de5d4fcbf63e00296fd95d33236b9794016631 66267
28+
0xdfd5293d8e347dfe59e90efd55b2956a1343963d 61877
29+
0x28c6c06298d514db089934071355e5743bf21d60 60632
30+
0x21a31ee1afc51d94c2efccaa2092ad1028285549 56200
31+
0x24b9f6ce8370a25104699682d878ad32f035956c 54026
32+
0x5d80a8d8cb80696073e82407968600a37e1dd780 53008
33+
0xb74c24738a261f37286fc6bf47f6901e51cf7f2f 50897
34+
0x2faf487a4414fe77e2327f0bf4ae2a264a776ad2 48096
35+
0x283af0b28c62c092c9727f1ee09c02ca627eb7f5 46409
36+
0xd8da6bf26964af9d7eed9e03e53415d37aa96045 40077
37+
0xb85a676965436e65f9b878c94cc4f5b53b96586e 37527
38+
0x385e1ed28a46ee39c3bf4fa1332791161a01ac2b 34000
39+
0x56eddb7aa87536c09ccc2793473599fd21a8b17f 33365
40+
0x46340b20830761efd32832a74d7169b29feb9758 32578
41+
0xddb108893104de4e1c6d0e47c42237db4e617acc 30861
42+
0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 30064
43+
0xc697051d1c6296c24ae3bcef39aca743861d9a81 29093
44+
0x69d460e01070a7ba1bc363885bc8f4f0daa19bf5 29033
45+
0x3e66b66fd1d0b02fda6c811da9e0547970db2f21 29009
46+
0x9696f59e4d72e237be84ffd425dcad154bf96976 28446
47+
0x65a06e2470b81c560fc3ca7fa4652c9c1e02f6b6 27914
48+
0xd152f549545093347a162dce210e7293f1452150 26478
49+
0xa5025faba6e70b84f74e9b1113e5f7f4e7f4859f 26312
50+
0x62eff3d16cf46d89053553c2987f724d4fa43778 25965
51+
0xdc24316b9ae028f1497c275eb9192a3ea0f67022 25355
52+
0x4b3edb22952fb4a70140e39fb1add05a6b49622b 24750
53+
0x57b800147aa8b43026844ba2c0745487afba4f8f 24749
54+
0xf16e9b0d03470827a95cdfd0cb8a8a3b46969b91 23990
55+
0x2ee08817311fdd64ec31cc66953b660547018b10 23198
56+
0xe66b31678d6c16e9ebf358268a790b763c133750 22816
57+
0x83c8f28c26bf6aaca652df1dbbe0e1b56f8baba2 22147
58+
0x65c2e54a4c75ff6da7b6b32369c1677250075fb2 21852
59+
0x5041ed759dd4afc3a72b8192c143f72f4724081a 21165
60+
0x1111111254fb6c44bac0bed2854e76f90643097d 20332
61+
0xafa2daab45766456568dc685bfb4bde174560813 20257
62+
0x111111111117dc0aa78b770fa6a738034120c302 20000
63+
0x944dce504256adbb96f563f14c80e6dca3800fb8 18537
64+
0x03f7724180aa6b939894b5ca4314783b0b36b329 17409
65+
0x66f176bb173de87fce3d1e828badea5081b7fb5e 15245
66+
0x7a250d5630b4cf539739df2c5dacb4c659f2488d 14827
67+
0x11b815efb8f581194ae79006d24e0d814b7697f6 14788
68+
0x8e1703e600f3a667482c4cedf9c5042c4f9e1fa5 14665
69+
0xec30d02f10353f8efc9601371f56e808751f396f 14192
70+
0xd1917932a7db6af687b523d5db5d7f5c2734763f 13409
71+
0x75e89d5979e4f6fba9f97c104c2f0afb3f1dcb88 13270
72+
0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45 12942
73+
0x0d0707963952f2fba59dd06f2b425ace40b492fe 12262
74+
0x6b175474e89094c44da98b954eedeac495271d0f 11592
75+
0xf89d7b9c864f589bbf53a82105107622b35eaa40 11549
76+
0xffec0067f5a79cff07527f63d83dd5462ccf8ba4 11317
77+
0xbbba5ba03d948d0a4cc010ca03d3b6e1b14f7098 11049
78+
0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc 10651
79+
0xa88ce09448bbef7c5808a6c7d2199781c13942ee 10334
80+
0xf60c2ea62edbfe808163751dd0d8693dcb30019c 9779
81+
0xa81011ae274ef6debd3bdab634102c7b6c2c452d 9273
82+
0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852 9224
83+
0xf42ed7184f3bdd07b0456952f67695683afd9044 9167
84+
0x974caa59e49682cda0ad2bbe82983419a2ecc400 8794
85+
0x72a5a076a9ecd3784ecb3c90e947d7883e4b2254 8706
86+
0x48c04ed5691981c42154c6167398f95e8f38a7ff 8690
87+
0x3416cf6c708da44db2624d63ea0aaef7113527c6 8665
88+
0xe9da256a28630efdc637bfd4c65f0887be1aeda8 8488
89+
0x9008d19f58aabd9ed0d60971565aa8510560ab41 8153
90+
0x5f65f7b609678448494de4c87521cdf6cef1e932 7430
91+
0x89e51fa8ca5d66cd220baed62ed01e8951aa7c40 7233
92+
0xd1669ac6044269b59fa12c5822439f609ca54f41 7083
93+
0x29d5527caa78f1946a409fa6acaf14a0a4a0274b 6803
94+
0x6238872a0bd9f0e19073695532a7ed77ce93c69e 6761
95+
0x6dfc34609a05bc22319fa4cce1d1e2929548c0d7 6538
96+
0x1c727a55ea3c11b0ab7d3a361fe0f3c47ce6de5d 6428
97+
0x6cc5f688a315f3dc28a7781717a9a798a59fda7b 6341
98+
0x55fe002aeff02f77364de339a1292923a15844b8 6242
99+
0x22f9dcf4647084d6c31b2765f6910cd85c178c18 6168
100+
0x25f2226b597e8f9514b3f68f00f494cf4f286491 5759
101+
0x47a90d927dfa99ec3a3582d2c4dabf12cf58f340 5605
102+
0x9e0905249ceefffb9605e034b534544684a58be6 5434
103+
0xdf87f0826c96615e126386cc57854e79d4331348 5419
104+
0xd45058bf25bbd8f586124c479d384c8c708ce23a 5066
105+
0x7abe0ce388281d2acf297cb089caef3819b13448 5022
106+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
CREATE TABLE `ethereum_token_transfers`
2+
(
3+
`block_timestamp` datetime NULL COMMENT "",
4+
`transaction_hash` varchar(100) NULL COMMENT "",
5+
`log_index` int(11) NULL COMMENT "",
6+
`block_hash` varchar(100) NULL COMMENT "",
7+
`block_number` int(11) NULL COMMENT "",
8+
`from_address` varchar(100) NULL COMMENT "",
9+
`to_address` varchar(100) NULL COMMENT "",
10+
`token_address` varchar(100) NULL COMMENT "",
11+
`value` float NULL COMMENT ""
12+
) ENGINE=OLAP
13+
UNIQUE KEY(`block_timestamp`, `transaction_hash`, `log_index`)
14+
COMMENT "OLAP"
15+
PARTITION BY RANGE(`block_timestamp`) (
16+
PARTITION p202208 VALUES [('2022-08-01 00:00:00'), ('2022-09-01 00:00:00')),
17+
PARTITION p202209 VALUES [('2022-09-01 00:00:00'), ('2022-10-01 00:00:00')),
18+
PARTITION p202210 VALUES [('2022-10-01 00:00:00'), ('2022-11-01 00:00:00'))
19+
)
20+
DISTRIBUTED BY HASH(`transaction_hash`) BUCKETS 10
21+
PROPERTIES (
22+
"replication_allocation" = "tag.location.default: 1",
23+
"bloom_filter_columns" = "to_address, from_address",
24+
"in_memory" = "false",
25+
"storage_format" = "V2"
26+
);
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
// The cases is copied from https://github.com/trinodb/trino/tree/master
19+
// /testing/trino-product-tests/src/main/resources/sql-tests/testcases/tpcds
20+
// and modified by Doris.
21+
suite("load") {
22+
def tables = [
23+
"ethereum_token_transfers"
24+
]
25+
26+
27+
for (String table in tables) {
28+
sql """ DROP TABLE IF EXISTS $table """
29+
sql new File("""${context.file.parent}/ddl/${table}.sql""").text
30+
}
31+
32+
for (String tableName in tables) {
33+
streamLoad {
34+
// you can skip db declaration, because a default db has already been
35+
// specified in ${DORIS_HOME}/conf/regression-conf.groovy
36+
// db 'regression_test'
37+
table tableName
38+
39+
// default label is UUID:
40+
// set 'label' UUID.randomUUID().toString()
41+
42+
// default column_separator is specify in doris fe config, usually is '\t'.
43+
// this line change to ','
44+
// set 'column_separator', ','
45+
set 'column_separator', ','
46+
set 'compress_type', 'GZ'
47+
// set 'max_filter_ratio' ,'1'
48+
49+
// relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv.
50+
// also, you can stream load a http stream, e.g. http://xxx/some.csv
51+
file """${getS3Url() + '/regression/usercases/FOOTPRINT2/' + tableName}.csv.gz"""
52+
53+
time 100000 // limit inflight 10s
54+
55+
// stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows
56+
57+
// if declared a check callback, the default check condition will ignore.
58+
// So you must check all condition
59+
check { result, exception, startTime, endTime ->
60+
if (exception != null) {
61+
throw exception
62+
}
63+
log.info("Stream load result: ${result}".toString())
64+
def json = parseJson(result)
65+
assertEquals("success", json.Status.toLowerCase())
66+
assertEquals(json.NumberTotalRows, json.NumberLoadedRows)
67+
assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0)
68+
}
69+
70+
}
71+
}
72+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SET exec_mem_limit=4G;
2+
SELECT from_address,
3+
count(distinct (to_address)) as nums
4+
FROM ethereum_token_transfers
5+
where block_timestamp >= '2022-09-01'
6+
and block_timestamp < '2022-10-01'
7+
group by from_address
8+
order by nums desc limit 100;

0 commit comments

Comments
 (0)