Skip to content

Commit

Permalink
chore(bench): fix create_tables.sql for tpch benchmark (#897)
Browse files Browse the repository at this point in the history
The `WITH HEADER ROW` and `DELIMETER` clauses are no longer in use,
and upstream datafusion errors out with a message saying so.
  • Loading branch information
Michael-J-Ward authored Oct 4, 2024
1 parent 5b9e528 commit 976b700
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions benchmarks/tpch/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ CREATE EXTERNAL TABLE customer (
c_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/customer.csv';

CREATE EXTERNAL TABLE lineitem (
Expand All @@ -36,7 +39,10 @@ CREATE EXTERNAL TABLE lineitem (
l_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/lineitem.csv';

CREATE EXTERNAL TABLE nation (
Expand All @@ -47,7 +53,10 @@ CREATE EXTERNAL TABLE nation (
n_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/nation.csv';

CREATE EXTERNAL TABLE orders (
Expand All @@ -63,7 +72,10 @@ CREATE EXTERNAL TABLE orders (
o_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/orders.csv';

CREATE EXTERNAL TABLE part (
Expand All @@ -79,7 +91,10 @@ CREATE EXTERNAL TABLE part (
p_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/part.csv';

CREATE EXTERNAL TABLE partsupp (
Expand All @@ -91,7 +106,10 @@ CREATE EXTERNAL TABLE partsupp (
ps_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/partsupp.csv';

CREATE EXTERNAL TABLE region (
Expand All @@ -101,7 +119,10 @@ CREATE EXTERNAL TABLE region (
r_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/region.csv';

CREATE EXTERNAL TABLE supplier (
Expand All @@ -115,5 +136,8 @@ CREATE EXTERNAL TABLE supplier (
s_extra VARCHAR NOT NULL,
)
STORED AS CSV
WITH HEADER ROW DELIMITER '|'
OPTIONS (
format.delimiter '|',
format.has_header true
)
LOCATION '$PATH/supplier.csv';

0 comments on commit 976b700

Please sign in to comment.