Skip to content

Commit 524c962

Browse files
committed
iceberg native
1 parent a41c35f commit 524c962

File tree

10 files changed

+121
-1
lines changed

10 files changed

+121
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
CREATE SCHEMA IF NOT EXISTS load_tpch_sf1000_parquet WITH (LOCATION = 's3a://presto-workload/hive_java_load_tpch_sf1000_parquet/');
1+
CREATE SCHEMA IF NOT EXISTS load_tpch_sf1000_parquet WITH (LOCATION = 's3a://presto-workload/hive_native_load_tpch_sf1000_parquet/');
22
--Do not need to explicitly speficy schema here
33
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+
c_custkey,
5+
CAST(c_name AS VARCHAR(25)),
6+
CAST(c_address AS VARCHAR(40)),
7+
c_nationkey,
8+
CAST(c_phone AS VARCHAR(15)),
9+
CAST(c_acctbal AS DECIMAL(12,2)),
10+
CAST(c_mktsegment AS VARCHAR(10)),
11+
CAST(c_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+
l_orderkey,
5+
l_partkey,
6+
l_suppkey,
7+
l_linenumber,
8+
CAST(l_quantity AS DECIMAL(12,2)),
9+
CAST(l_extendedprice AS DECIMAL(12,2)),
10+
CAST(l_discount AS DECIMAL(12,2)),
11+
CAST(l_tax AS DECIMAL(12,2)),
12+
CAST(l_returnflag AS VARCHAR(1)),
13+
CAST(l_linestatus AS VARCHAR(1)),
14+
l_shipdate,
15+
l_commitdate,
16+
l_receiptdate,
17+
CAST(l_shipinstruct AS VARCHAR(25)),
18+
CAST(l_shipmode AS VARCHAR(10)),
19+
CAST(l_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+
n_nationkey,
5+
CAST(n_name AS VARCHAR(25)),
6+
n_regionkey,
7+
CAST(n_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+
o_orderkey,
5+
o_custkey,
6+
CAST(o_orderstatus AS VARCHAR(1)),
7+
CAST(o_totalprice AS DECIMAL(12,2)),
8+
o_orderdate,
9+
CAST(o_orderpriority AS VARCHAR(15)),
10+
CAST(o_clerk AS VARCHAR(15)),
11+
o_shippriority,
12+
CAST(o_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+
p_partkey,
5+
CAST(p_name AS VARCHAR(55)),
6+
CAST(p_mfgr AS VARCHAR(25)),
7+
CAST(p_brand AS VARCHAR(10)),
8+
CAST(p_type AS VARCHAR(25)),
9+
p_size,
10+
CAST(p_container AS VARCHAR(10)),
11+
CAST(p_retailprice AS DECIMAL(12,2)),
12+
CAST(p_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+
ps_partkey,
5+
ps_suppkey,
6+
ps_availqty,
7+
CAST(ps_supplycost AS DECIMAL(12,2)),
8+
CAST(ps_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+
r_regionkey,
5+
CAST(r_name AS VARCHAR(25)),
6+
CAST(r_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+
s_suppkey,
5+
CAST(s_name AS VARCHAR(25)),
6+
CAST(s_address AS VARCHAR(40)),
7+
s_nationkey,
8+
CAST(s_phone AS VARCHAR(15)),
9+
CAST(s_acctbal AS DECIMAL(12,2)),
10+
CAST(s_comment AS VARCHAR(101))
11+
FROM tpch.sf1000.supplier;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"description": "Loading tpch with scaling factor 10 to hive parquet tables.",
3+
"query_files": [
4+
"hive-tpch-parquet-n-1000/customer_sf1000.sql",
5+
"hive-tpch-parquet-n-1000/lineitem_sf1000.sql",
6+
"hive-tpch-parquet-n-1000/nation_sf1000.sql",
7+
"hive-tpch-parquet-n-1000/orders_sf1000.sql",
8+
"hive-tpch-parquet-n-1000/part_sf1000.sql",
9+
"hive-tpch-parquet-n-1000/partsupp_sf1000.sql",
10+
"hive-tpch-parquet-n-1000/region_sf1000.sql",
11+
"hive-tpch-parquet-n-1000/supplier_sf1000.sql"
12+
],
13+
"expected_row_counts": {
14+
"load_tpch_sf100_parquet": [
15+
1,
16+
1,
17+
1,
18+
1,
19+
1,
20+
1,
21+
1,
22+
1,
23+
1,
24+
1
25+
]
26+
}
27+
}

0 commit comments

Comments
 (0)