Skip to content

Commit 66560ab

Browse files
committed
[tpch] Extend TABLE_COLUMNS with additional TPC-H schemas for region, nation, supplier, customer, orders, part, and partsupp
Signed-off-by: daiping8 <dai.ping88@zte.com.cn>
1 parent 593ce76 commit 66560ab

File tree

1 file changed

+63
-1
lines changed

1 file changed

+63
-1
lines changed

release/nightly_tests/dataset/tpch/common.py

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,69 @@
88
from benchmark import Benchmark
99

1010
# Define schemas for TPC-H tables
11+
# Parquet datasets use column0, column1, ... (or column00, column01 for lineitem)
1112
TABLE_COLUMNS = {
13+
"region": {
14+
"column0": "r_regionkey",
15+
"column1": "r_name",
16+
"column2": "r_comment",
17+
"column3": "r_dummy",
18+
},
19+
"nation": {
20+
"column0": "n_nationkey",
21+
"column1": "n_name",
22+
"column2": "n_regionkey",
23+
"column3": "n_comment",
24+
},
25+
"supplier": {
26+
"column0": "s_suppkey",
27+
"column1": "s_name",
28+
"column2": "s_address",
29+
"column3": "s_nationkey",
30+
"column4": "s_phone",
31+
"column5": "s_acctbal",
32+
"column6": "s_comment",
33+
"column7": "s_dummy",
34+
},
35+
"customer": {
36+
"column0": "c_custkey",
37+
"column1": "c_name",
38+
"column2": "c_address",
39+
"column3": "c_nationkey",
40+
"column4": "c_phone",
41+
"column5": "c_acctbal",
42+
"column6": "c_mktsegment",
43+
"column7": "c_comment",
44+
},
45+
"orders": {
46+
"column0": "o_orderkey",
47+
"column1": "o_custkey",
48+
"column2": "o_orderstatus",
49+
"column3": "o_totalprice",
50+
"column4": "o_orderdate",
51+
"column5": "o_orderpriority",
52+
"column6": "o_clerk",
53+
"column7": "o_shippriority",
54+
"column8": "o_comment",
55+
},
56+
"part": {
57+
"column0": "p_partkey",
58+
"column1": "p_name",
59+
"column2": "p_mfgr",
60+
"column3": "p_brand",
61+
"column4": "p_type",
62+
"column5": "p_size",
63+
"column6": "p_container",
64+
"column7": "p_retailprice",
65+
"column8": "p_comment",
66+
},
67+
"partsupp": {
68+
"column0": "ps_partkey",
69+
"column1": "ps_suppkey",
70+
"column2": "ps_availqty",
71+
"column3": "ps_supplycost",
72+
"column4": "ps_comment",
73+
},
1274
"lineitem": {
1375
"column00": "l_orderkey",
1476
"column01": "l_partkey",
@@ -26,7 +88,7 @@
2688
"column13": "l_shipinstruct",
2789
"column14": "l_shipmode",
2890
"column15": "l_comment",
29-
}
91+
},
3092
}
3193

3294

0 commit comments

Comments
 (0)