Skip to content

Commit a41c35f

Browse files
committed
Add sf1000 for hive
1 parent 2d82ce2 commit a41c35f

File tree

12 files changed

+132
-2
lines changed

12 files changed

+132
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
CREATE SCHEMA IF NOT EXISTS load_tpch_sf100_parquet WITH (LOCATION = 's3a://presto-workload/hive_java_load_tpch_sf100_parquet/');
1+
CREATE SCHEMA IF NOT EXISTS load_tpch_sf1000_parquet WITH (LOCATION = 's3a://presto-workload/hive_java_load_tpch_sf1000_parquet/');
22
--Do not need to explicitly speficy schema here
3-
USE load_tpch_sf100_parquet;
3+
USE load_tpch_sf1000_parquet;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- Inserting into customer
2+
INSERT INTO customer
3+
SELECT
4+
custkey,
5+
CAST(name AS VARCHAR(25)),
6+
CAST(address AS VARCHAR(40)),
7+
nationkey,
8+
CAST(phone AS VARCHAR(15)),
9+
CAST(acctbal AS DECIMAL(12,2)),
10+
CAST(mktsegment AS VARCHAR(10)),
11+
CAST(comment AS VARCHAR(117))
12+
FROM tpch.sf1000.customer;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Inserting into lineitem
2+
INSERT INTO lineitem
3+
SELECT
4+
orderkey,
5+
partkey,
6+
suppkey,
7+
linenumber,
8+
CAST(quantity AS DECIMAL(12,2)),
9+
CAST(extendedprice AS DECIMAL(12,2)),
10+
CAST(discount AS DECIMAL(12,2)),
11+
CAST(tax AS DECIMAL(12,2)),
12+
CAST(returnflag AS VARCHAR(1)),
13+
CAST(linestatus AS VARCHAR(1)),
14+
shipdate,
15+
commitdate,
16+
receiptdate,
17+
CAST(shipinstruct AS VARCHAR(25)),
18+
CAST(shipmode AS VARCHAR(10)),
19+
CAST(comment AS VARCHAR(44))
20+
FROM tpch.sf1000.lineitem;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Inserting into nation
2+
INSERT INTO nation
3+
SELECT
4+
nationkey,
5+
CAST(name AS VARCHAR(25)),
6+
regionkey,
7+
CAST(comment AS VARCHAR(152))
8+
FROM tpch.sf1000.nation;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- Inserting into orders
2+
INSERT INTO orders
3+
SELECT
4+
orderkey,
5+
custkey,
6+
CAST(orderstatus AS VARCHAR(1)),
7+
CAST(totalprice AS DECIMAL(12,2)),
8+
orderdate,
9+
CAST(orderpriority AS VARCHAR(15)),
10+
CAST(clerk AS VARCHAR(15)),
11+
shippriority,
12+
CAST(comment AS VARCHAR(79))
13+
FROM tpch.sf1000.orders;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- Inserting into part
2+
INSERT INTO part
3+
SELECT
4+
partkey,
5+
CAST(name AS VARCHAR(55)),
6+
CAST(mfgr AS VARCHAR(25)),
7+
CAST(brand AS VARCHAR(10)),
8+
CAST(type AS VARCHAR(25)),
9+
size,
10+
CAST(container AS VARCHAR(10)),
11+
CAST(retailprice AS DECIMAL(12,2)),
12+
CAST(comment AS VARCHAR(23))
13+
FROM tpch.sf1000.part;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- Inserting into partsupp
2+
INSERT INTO partsupp
3+
SELECT
4+
partkey,
5+
suppkey,
6+
availqty,
7+
CAST(supplycost AS DECIMAL(12,2)),
8+
CAST(comment AS VARCHAR(199))
9+
FROM tpch.sf1000.partsupp;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Inserting into region
2+
INSERT INTO region
3+
SELECT
4+
regionkey,
5+
CAST(name AS VARCHAR(25)),
6+
CAST(comment AS VARCHAR(152))
7+
FROM tpch.sf1000.region;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- Inserting into supplier
2+
INSERT INTO supplier
3+
SELECT
4+
suppkey,
5+
CAST(name AS VARCHAR(25)),
6+
CAST(address AS VARCHAR(40)),
7+
nationkey,
8+
CAST(phone AS VARCHAR(15)),
9+
CAST(acctbal AS DECIMAL(12,2)),
10+
CAST(comment AS VARCHAR(101))
11+
FROM tpch.sf1000.supplier;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"description": "Specifies the schema for TPCH scale factor 10 GB.",
3+
"catalog": "hive",
4+
"schema": "load_tpch_sf1000_parquet"
5+
}

0 commit comments

Comments
 (0)