8000 chore(bench): fix create_tables.sql for tpch benchmark (#897) · kylebarron/datafusion-python@976b700 · GitHub
[go: up one dir, main page]

Skip to content

Commit 976b700

Browse files
chore(bench): fix create_tables.sql for tpch benchmark (apache#897)
The `WITH HEADER ROW` and `DELIMETER` clauses are no longer in use, and upstream datafusion errors out with a message saying so.
1 parent 5b9e528 commit 976b700

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

benchmarks/tpch/create_tables.sql

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ CREATE EXTERNAL TABLE customer (
1313
c_extra VARCHAR NOT NULL,
1414
)
1515
STORED AS CSV
16-
WITH HEADER ROW DELIMITER '|'
16+
OPTIONS (
17+
format.delimiter '|',
18+
format.has_header true
19+
)
1720
LOCATION '$PATH/customer.csv';
1821

1922
CREATE EXTERNAL TABLE lineitem (
@@ -36,7 +39,10 @@ CREATE EXTERNAL TABLE lineitem (
3639
l_extra VARCHAR NOT NULL,
3740
)
3841
STORED AS CSV
39-
WITH HEADER ROW DELIMITER '|'
42+
OPTIONS (
43+
format.delimiter '|',
44+
format.has_header true
45+
)
4046
LOCATION '$PATH/lineitem.csv';
4147

4248
CREATE EXTERNAL TABLE nation (
@@ -47,7 +53,10 @@ CREATE EXTERNAL TABLE nation (
4753
n_extra VARCHAR NOT NULL,
4854
)
4955
STORED AS CSV
50-
WITH HEADER ROW DELIMITER '|'
56+
OPTIONS (
57+
format.delimiter '|',
58+
format.has_header true
59+
)
5160
LOCATION '$PATH/nation.csv';
5261

5362
CREATE EXTERNAL TABLE orders (
@@ -63,7 +72,10 @@ CREATE EXTERNAL TABLE orders (
6372
o_extra VARCHAR NOT NULL,
6473
)
6574
STORED AS CSV
66-
WITH HEADER ROW DELIMITER '|'
75+
OPTIONS (
76+
format.delimiter '|',
77+
format.has_header true
78+
)
6779
LOCATION '$PATH/orders.csv';
6880

6981
CREATE EXTERNAL TABLE part (
@@ -79,7 +91,10 @@ CREATE EXTERNAL TABLE part (
7991
p_extra VARCHAR NOT NULL,
8092
)
8193
STORED AS CSV
82-
WITH HEADER ROW DELIMITER '|'
94+
OPTIONS (
95+
format.delimiter '|',
96+
format.has_header true
97+
)
8398
LOCATION '$PATH/part.csv';
8499

85100
CREATE EXTERNAL TABLE partsupp (
@@ -91,7 +106,10 @@ CREATE EXTERNAL TABLE partsupp (
91106
ps_extra VARCHAR NOT NULL,
92107
)
93108
STORED AS CSV
94-
WITH HEADER ROW DELIMITER '|'
109+
OPTIONS (
110+
format.delimiter '|',
111+
format.has_header true
112+
)
95113
LOCATION '$PATH/partsupp.csv';
96114

97115
CREATE EXTERNAL TABLE region (
@@ -101,7 +119,10 @@ CREATE EXTERNAL TABLE region (
101119
r_extra VARCHAR NOT NULL,
102120
)
103121
STORED AS CSV
104-
WITH HEADER ROW DELIMITER '|'
122+
OPTIONS (
123+
format.delimiter '|',
124+
format.has_header true
125+
)
105126
LOCATION '$PATH/region.csv';
106127

107128
CREATE EXTERNAL TABLE supplier (
@@ -115,5 +136,8 @@ CREATE EXTERNAL TABLE supplier (
115136
s_extra VARCHAR NOT NULL,
116137
)
117138
STORED AS CSV
118-
WITH HEADER ROW DELIMITER '|'
139+
OPTIONS (
140+
format.delimiter '|',
141+
format.has_header true
142+
)
119143
LOCATION '$PATH/supplier.csv';

0 commit comments

Comments
 (0)
0