diff --git a/benchmarks/tpch-load/cleanup_sf100.json b/benchmarks/tpch-load/cleanup_sf100.json new file mode 100644 index 0000000..68d726a --- /dev/null +++ b/benchmarks/tpch-load/cleanup_sf100.json @@ -0,0 +1,14 @@ +{ + "description": "Cleanup tables.", + "query_files": [ + "drop-table/customer.sql", + "drop-table/lineitem.sql", + "drop-table/nation.sql", + "drop-table/orders.sql", + "drop-table/part.sql", + "drop-table/partsupp.sql", + "drop-table/region.sql", + "drop-table/supplier.sql", + "schema/drop_sf100.sql" + ] +} diff --git a/benchmarks/tpch-load/cleanup_sf1000.json b/benchmarks/tpch-load/cleanup_sf1000.json new file mode 100644 index 0000000..be3decf --- /dev/null +++ b/benchmarks/tpch-load/cleanup_sf1000.json @@ -0,0 +1,14 @@ +{ + "description": "Cleanup tables.", + "query_files": [ + "drop-table/customer.sql", + "drop-table/lineitem.sql", + "drop-table/nation.sql", + "drop-table/orders.sql", + "drop-table/part.sql", + "drop-table/partsupp.sql", + "drop-table/region.sql", + "drop-table/supplier.sql", + "schema/drop_sf1000.sql" + ] +} diff --git a/benchmarks/tpch-load/create-table/customer.sql b/benchmarks/tpch-load/create-table/customer.sql new file mode 100644 index 0000000..9ba90b2 --- /dev/null +++ b/benchmarks/tpch-load/create-table/customer.sql @@ -0,0 +1,11 @@ +-- Creating customer table with PARQUET format +CREATE TABLE customer ( + custkey BIGINT NOT NULL, + name VARCHAR(25) NOT NULL, + address VARCHAR(40) NOT NULL, + nationkey BIGINT NOT NULL, + phone VARCHAR(15) NOT NULL, + acctbal DECIMAL(12,2) NOT NULL, + mktsegment VARCHAR(10) NOT NULL, + comment VARCHAR(117) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/lineitem.sql b/benchmarks/tpch-load/create-table/lineitem.sql new file mode 100644 index 0000000..f82c75d --- /dev/null +++ b/benchmarks/tpch-load/create-table/lineitem.sql @@ -0,0 +1,19 @@ +-- Creating lineitem table with PARQUET format +CREATE TABLE lineitem ( + orderkey BIGINT NOT NULL, + partkey BIGINT NOT NULL, + suppkey BIGINT NOT NULL, + linenumber BIGINT NOT NULL, + quantity DECIMAL(12,2) NOT NULL, + extendedprice DECIMAL(12,2) NOT NULL, + discount DECIMAL(12,2) NOT NULL, + tax DECIMAL(12,2) NOT NULL, + returnflag VARCHAR(1) NOT NULL, + linestatus VARCHAR(1) NOT NULL, + shipdate DATE NOT NULL, + commitdate DATE NOT NULL, + receiptdate DATE NOT NULL, + shipinstruct VARCHAR(25) NOT NULL, + shipmode VARCHAR(10) NOT NULL, + comment VARCHAR(44) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/nation.sql b/benchmarks/tpch-load/create-table/nation.sql new file mode 100644 index 0000000..1bcd761 --- /dev/null +++ b/benchmarks/tpch-load/create-table/nation.sql @@ -0,0 +1,7 @@ +-- Creating nation table with PARQUET format +CREATE TABLE nation ( + nationkey BIGINT NOT NULL, + name VARCHAR(25) NOT NULL, + regionkey BIGINT NOT NULL, + comment VARCHAR(152) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/orders.sql b/benchmarks/tpch-load/create-table/orders.sql new file mode 100644 index 0000000..ab100d1 --- /dev/null +++ b/benchmarks/tpch-load/create-table/orders.sql @@ -0,0 +1,12 @@ +-- Creating orders table with PARQUET format +CREATE TABLE orders ( + orderkey BIGINT NOT NULL, + custkey BIGINT NOT NULL, + orderstatus VARCHAR(1) NOT NULL, + totalprice DECIMAL(12,2) NOT NULL, + orderdate DATE NOT NULL, + orderpriority VARCHAR(15) NOT NULL, + clerk VARCHAR(15) NOT NULL, + shippriority BIGINT NOT NULL, + comment VARCHAR(79) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/part.sql b/benchmarks/tpch-load/create-table/part.sql new file mode 100644 index 0000000..7577620 --- /dev/null +++ b/benchmarks/tpch-load/create-table/part.sql @@ -0,0 +1,12 @@ +-- Creating part table with PARQUET format +CREATE TABLE part ( + partkey BIGINT NOT NULL, + name VARCHAR(55) NOT NULL, + mfgr VARCHAR(25) NOT NULL, + brand VARCHAR(10) NOT NULL, + type VARCHAR(25) NOT NULL, + size BIGINT NOT NULL, + container VARCHAR(10) NOT NULL, + retailprice DECIMAL(12,2) NOT NULL, + comment VARCHAR(23) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/partsupp.sql b/benchmarks/tpch-load/create-table/partsupp.sql new file mode 100644 index 0000000..5799588 --- /dev/null +++ b/benchmarks/tpch-load/create-table/partsupp.sql @@ -0,0 +1,8 @@ +-- Creating partsupp table with PARQUET format +CREATE TABLE partsupp ( + partkey BIGINT NOT NULL, + suppkey BIGINT NOT NULL, + availqty BIGINT NOT NULL, + supplycost DECIMAL(12,2) NOT NULL, + comment VARCHAR(199) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/region.sql b/benchmarks/tpch-load/create-table/region.sql new file mode 100644 index 0000000..0c943ba --- /dev/null +++ b/benchmarks/tpch-load/create-table/region.sql @@ -0,0 +1,6 @@ +-- Creating region table with PARQUET format +CREATE TABLE region ( + regionkey BIGINT NOT NULL, + name VARCHAR(25) NOT NULL, + comment VARCHAR(152) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/create-table/supplier.sql b/benchmarks/tpch-load/create-table/supplier.sql new file mode 100644 index 0000000..aa88e1f --- /dev/null +++ b/benchmarks/tpch-load/create-table/supplier.sql @@ -0,0 +1,10 @@ +-- Creating supplier table with PARQUET format +CREATE TABLE supplier ( + suppkey BIGINT NOT NULL, + name VARCHAR(25) NOT NULL, + address VARCHAR(40) NOT NULL, + nationkey BIGINT NOT NULL, + phone VARCHAR(15) NOT NULL, + acctbal DECIMAL(12,2) NOT NULL, + comment VARCHAR(101) NOT NULL +) WITH (format = 'PARQUET'); diff --git a/benchmarks/tpch-load/drop-table/customer.sql b/benchmarks/tpch-load/drop-table/customer.sql new file mode 100644 index 0000000..9662528 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/customer.sql @@ -0,0 +1 @@ +DROP TABLE customer; diff --git a/benchmarks/tpch-load/drop-table/lineitem.sql b/benchmarks/tpch-load/drop-table/lineitem.sql new file mode 100644 index 0000000..3435b53 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/lineitem.sql @@ -0,0 +1 @@ +DROP TABLE lineitem; diff --git a/benchmarks/tpch-load/drop-table/nation.sql b/benchmarks/tpch-load/drop-table/nation.sql new file mode 100644 index 0000000..708d691 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/nation.sql @@ -0,0 +1 @@ +DROP TABLE nation; diff --git a/benchmarks/tpch-load/drop-table/orders.sql b/benchmarks/tpch-load/drop-table/orders.sql new file mode 100644 index 0000000..1ba41c1 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/orders.sql @@ -0,0 +1 @@ +DROP TABLE orders; diff --git a/benchmarks/tpch-load/drop-table/part.sql b/benchmarks/tpch-load/drop-table/part.sql new file mode 100644 index 0000000..56e9b74 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/part.sql @@ -0,0 +1 @@ +DROP TABLE part; diff --git a/benchmarks/tpch-load/drop-table/partsupp.sql b/benchmarks/tpch-load/drop-table/partsupp.sql new file mode 100644 index 0000000..cdc9e81 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/partsupp.sql @@ -0,0 +1 @@ +DROP TABLE partsupp; diff --git a/benchmarks/tpch-load/drop-table/region.sql b/benchmarks/tpch-load/drop-table/region.sql new file mode 100644 index 0000000..07a3db8 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/region.sql @@ -0,0 +1 @@ +DROP TABLE region; diff --git a/benchmarks/tpch-load/drop-table/supplier.sql b/benchmarks/tpch-load/drop-table/supplier.sql new file mode 100644 index 0000000..16402e9 --- /dev/null +++ b/benchmarks/tpch-load/drop-table/supplier.sql @@ -0,0 +1 @@ +DROP TABLE supplier; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/customer_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/customer_sf100.sql new file mode 100644 index 0000000..c139ecb --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/customer_sf100.sql @@ -0,0 +1,12 @@ +-- Inserting into customer +INSERT INTO customer +SELECT + custkey, + CAST(name AS VARCHAR(25)), + CAST(address AS VARCHAR(40)), + nationkey, + CAST(phone AS VARCHAR(15)), + CAST(acctbal AS DECIMAL(12,2)), + CAST(mktsegment AS VARCHAR(10)), + CAST(comment AS VARCHAR(117)) +FROM tpch.sf100.customer; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/lineitem_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/lineitem_sf100.sql new file mode 100644 index 0000000..0a9fa02 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/lineitem_sf100.sql @@ -0,0 +1,20 @@ +-- Inserting into lineitem +INSERT INTO lineitem +SELECT + orderkey, + partkey, + suppkey, + linenumber, + CAST(quantity AS DECIMAL(12,2)), + CAST(extendedprice AS DECIMAL(12,2)), + CAST(discount AS DECIMAL(12,2)), + CAST(tax AS DECIMAL(12,2)), + CAST(returnflag AS VARCHAR(1)), + CAST(linestatus AS VARCHAR(1)), + shipdate, + commitdate, + receiptdate, + CAST(shipinstruct AS VARCHAR(25)), + CAST(shipmode AS VARCHAR(10)), + CAST(comment AS VARCHAR(44)) +FROM tpch.sf100.lineitem; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/nation_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/nation_sf100.sql new file mode 100644 index 0000000..5d76b84 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/nation_sf100.sql @@ -0,0 +1,8 @@ +-- Inserting into nation +INSERT INTO nation +SELECT + nationkey, + CAST(name AS VARCHAR(25)), + regionkey, + CAST(comment AS VARCHAR(152)) +FROM tpch.sf100.nation; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/orders_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/orders_sf100.sql new file mode 100644 index 0000000..d1abe7c --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/orders_sf100.sql @@ -0,0 +1,13 @@ +-- Inserting into orders +INSERT INTO orders +SELECT + orderkey, + custkey, + CAST(orderstatus AS VARCHAR(1)), + CAST(totalprice AS DECIMAL(12,2)), + orderdate, + CAST(orderpriority AS VARCHAR(15)), + CAST(clerk AS VARCHAR(15)), + shippriority, + CAST(comment AS VARCHAR(79)) +FROM tpch.sf100.orders; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/part_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/part_sf100.sql new file mode 100644 index 0000000..eeb19b2 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/part_sf100.sql @@ -0,0 +1,13 @@ +-- Inserting into part +INSERT INTO part +SELECT + partkey, + CAST(name AS VARCHAR(55)), + CAST(mfgr AS VARCHAR(25)), + CAST(brand AS VARCHAR(10)), + CAST(type AS VARCHAR(25)), + size, + CAST(container AS VARCHAR(10)), + CAST(retailprice AS DECIMAL(12,2)), + CAST(comment AS VARCHAR(23)) +FROM tpch.sf100.part; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/partsupp_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/partsupp_sf100.sql new file mode 100644 index 0000000..394d845 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/partsupp_sf100.sql @@ -0,0 +1,9 @@ +-- Inserting into partsupp +INSERT INTO partsupp +SELECT + partkey, + suppkey, + availqty, + CAST(supplycost AS DECIMAL(12,2)), + CAST(comment AS VARCHAR(199)) +FROM tpch.sf100.partsupp; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/region_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/region_sf100.sql new file mode 100644 index 0000000..705812e --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/region_sf100.sql @@ -0,0 +1,7 @@ +-- Inserting into region +INSERT INTO region +SELECT + regionkey, + CAST(name AS VARCHAR(25)), + CAST(comment AS VARCHAR(152)) +FROM tpch.sf100.region; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-100/supplier_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/supplier_sf100.sql new file mode 100644 index 0000000..f950261 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-100/supplier_sf100.sql @@ -0,0 +1,11 @@ +-- Inserting into supplier +INSERT INTO supplier +SELECT + suppkey, + CAST(name AS VARCHAR(25)), + CAST(address AS VARCHAR(40)), + nationkey, + CAST(phone AS VARCHAR(15)), + CAST(acctbal AS DECIMAL(12,2)), + CAST(comment AS VARCHAR(101)) +FROM tpch.sf100.supplier; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/customer_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/customer_sf1000.sql new file mode 100644 index 0000000..92f6bee --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/customer_sf1000.sql @@ -0,0 +1,12 @@ +-- Inserting into customer +INSERT INTO customer +SELECT + custkey, + CAST(name AS VARCHAR(25)), + CAST(address AS VARCHAR(40)), + nationkey, + CAST(phone AS VARCHAR(15)), + CAST(acctbal AS DECIMAL(12,2)), + CAST(mktsegment AS VARCHAR(10)), + CAST(comment AS VARCHAR(117)) +FROM tpch.sf1000.customer; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/lineitem_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/lineitem_sf1000.sql new file mode 100644 index 0000000..558f219 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/lineitem_sf1000.sql @@ -0,0 +1,20 @@ +-- Inserting into lineitem +INSERT INTO lineitem +SELECT + orderkey, + partkey, + suppkey, + linenumber, + CAST(quantity AS DECIMAL(12,2)), + CAST(extendedprice AS DECIMAL(12,2)), + CAST(discount AS DECIMAL(12,2)), + CAST(tax AS DECIMAL(12,2)), + CAST(returnflag AS VARCHAR(1)), + CAST(linestatus AS VARCHAR(1)), + shipdate, + commitdate, + receiptdate, + CAST(shipinstruct AS VARCHAR(25)), + CAST(shipmode AS VARCHAR(10)), + CAST(comment AS VARCHAR(44)) +FROM tpch.sf1000.lineitem; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/nation_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/nation_sf1000.sql new file mode 100644 index 0000000..8578dd0 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/nation_sf1000.sql @@ -0,0 +1,8 @@ +-- Inserting into nation +INSERT INTO nation +SELECT + nationkey, + CAST(name AS VARCHAR(25)), + regionkey, + CAST(comment AS VARCHAR(152)) +FROM tpch.sf1000.nation; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/orders_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/orders_sf1000.sql new file mode 100644 index 0000000..82cf698 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/orders_sf1000.sql @@ -0,0 +1,13 @@ +-- Inserting into orders +INSERT INTO orders +SELECT + orderkey, + custkey, + CAST(orderstatus AS VARCHAR(1)), + CAST(totalprice AS DECIMAL(12,2)), + orderdate, + CAST(orderpriority AS VARCHAR(15)), + CAST(clerk AS VARCHAR(15)), + shippriority, + CAST(comment AS VARCHAR(79)) +FROM tpch.sf1000.orders; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/part_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/part_sf1000.sql new file mode 100644 index 0000000..dfc708b --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/part_sf1000.sql @@ -0,0 +1,13 @@ +-- Inserting into part +INSERT INTO part +SELECT + partkey, + CAST(name AS VARCHAR(55)), + CAST(mfgr AS VARCHAR(25)), + CAST(brand AS VARCHAR(10)), + CAST(type AS VARCHAR(25)), + size, + CAST(container AS VARCHAR(10)), + CAST(retailprice AS DECIMAL(12,2)), + CAST(comment AS VARCHAR(23)) +FROM tpch.sf1000.part; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/partsupp_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/partsupp_sf1000.sql new file mode 100644 index 0000000..0a4495a --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/partsupp_sf1000.sql @@ -0,0 +1,9 @@ +-- Inserting into partsupp +INSERT INTO partsupp +SELECT + partkey, + suppkey, + availqty, + CAST(supplycost AS DECIMAL(12,2)), + CAST(comment AS VARCHAR(199)) +FROM tpch.sf1000.partsupp; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/region_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/region_sf1000.sql new file mode 100644 index 0000000..4aa6e6c --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/region_sf1000.sql @@ -0,0 +1,7 @@ +-- Inserting into region +INSERT INTO region +SELECT + regionkey, + CAST(name AS VARCHAR(25)), + CAST(comment AS VARCHAR(152)) +FROM tpch.sf1000.region; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/supplier_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/supplier_sf1000.sql new file mode 100644 index 0000000..6be2e3d --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-j-1000/supplier_sf1000.sql @@ -0,0 +1,11 @@ +-- Inserting into supplier +INSERT INTO supplier +SELECT + suppkey, + CAST(name AS VARCHAR(25)), + CAST(address AS VARCHAR(40)), + nationkey, + CAST(phone AS VARCHAR(15)), + CAST(acctbal AS DECIMAL(12,2)), + CAST(comment AS VARCHAR(101)) +FROM tpch.sf1000.supplier; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/customer_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/customer_sf100.sql new file mode 100644 index 0000000..e337afc --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/customer_sf100.sql @@ -0,0 +1,12 @@ +-- Inserting into customer +INSERT INTO customer +SELECT + c_custkey, + CAST(c_name AS VARCHAR(25)), + CAST(c_address AS VARCHAR(40)), + c_nationkey, + CAST(c_phone AS VARCHAR(15)), + CAST(c_acctbal AS DECIMAL(12,2)), + CAST(c_mktsegment AS VARCHAR(10)), + CAST(c_comment AS VARCHAR(117)) +FROM tpch.sf100.customer; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/lineitem_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/lineitem_sf100.sql new file mode 100644 index 0000000..9489449 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/lineitem_sf100.sql @@ -0,0 +1,20 @@ +-- Inserting into lineitem +INSERT INTO lineitem +SELECT + l_orderkey, + l_partkey, + l_suppkey, + l_linenumber, + CAST(l_quantity AS DECIMAL(12,2)), + CAST(l_extendedprice AS DECIMAL(12,2)), + CAST(l_discount AS DECIMAL(12,2)), + CAST(l_tax AS DECIMAL(12,2)), + CAST(l_returnflag AS VARCHAR(1)), + CAST(l_linestatus AS VARCHAR(1)), + l_shipdate, + l_commitdate, + l_receiptdate, + CAST(l_shipinstruct AS VARCHAR(25)), + CAST(l_shipmode AS VARCHAR(10)), + CAST(l_comment AS VARCHAR(44)) +FROM tpch.sf100.lineitem; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/nation_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/nation_sf100.sql new file mode 100644 index 0000000..532bf38 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/nation_sf100.sql @@ -0,0 +1,8 @@ +-- Inserting into nation +INSERT INTO nation +SELECT + n_nationkey, + CAST(n_name AS VARCHAR(25)), + n_regionkey, + CAST(n_comment AS VARCHAR(152)) +FROM tpch.sf100.nation; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/orders_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/orders_sf100.sql new file mode 100644 index 0000000..73caf1a --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/orders_sf100.sql @@ -0,0 +1,13 @@ +-- Inserting into orders +INSERT INTO orders +SELECT + o_orderkey, + o_custkey, + CAST(o_orderstatus AS VARCHAR(1)), + CAST(o_totalprice AS DECIMAL(12,2)), + o_orderdate, + CAST(o_orderpriority AS VARCHAR(15)), + CAST(o_clerk AS VARCHAR(15)), + o_shippriority, + CAST(o_comment AS VARCHAR(79)) +FROM tpch.sf100.orders; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/part_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/part_sf100.sql new file mode 100644 index 0000000..be0ba43 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/part_sf100.sql @@ -0,0 +1,13 @@ +-- Inserting into part +INSERT INTO part +SELECT + p_partkey, + CAST(p_name AS VARCHAR(55)), + CAST(p_mfgr AS VARCHAR(25)), + CAST(p_brand AS VARCHAR(10)), + CAST(p_type AS VARCHAR(25)), + p_size, + CAST(p_container AS VARCHAR(10)), + CAST(p_retailprice AS DECIMAL(12,2)), + CAST(p_comment AS VARCHAR(23)) +FROM tpch.sf100.part; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/partsupp_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/partsupp_sf100.sql new file mode 100644 index 0000000..61eb981 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/partsupp_sf100.sql @@ -0,0 +1,9 @@ +-- Inserting into partsupp +INSERT INTO partsupp +SELECT + ps_partkey, + ps_suppkey, + ps_availqty, + CAST(ps_supplycost AS DECIMAL(12,2)), + CAST(ps_comment AS VARCHAR(199)) +FROM tpch.sf100.partsupp; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/region_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/region_sf100.sql new file mode 100644 index 0000000..c90a82b --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/region_sf100.sql @@ -0,0 +1,7 @@ +-- Inserting into region +INSERT INTO region +SELECT + r_regionkey, + CAST(r_name AS VARCHAR(25)), + CAST(r_comment AS VARCHAR(152)) +FROM tpch.sf100.region; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-100/supplier_sf100.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/supplier_sf100.sql new file mode 100644 index 0000000..1d39b8c --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-100/supplier_sf100.sql @@ -0,0 +1,11 @@ +-- Inserting into supplier +INSERT INTO supplier +SELECT + s_suppkey, + CAST(s_name AS VARCHAR(25)), + CAST(s_address AS VARCHAR(40)), + s_nationkey, + CAST(s_phone AS VARCHAR(15)), + CAST(s_acctbal AS DECIMAL(12,2)), + CAST(s_comment AS VARCHAR(101)) +FROM tpch.sf100.supplier; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/customer_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/customer_sf1000.sql new file mode 100644 index 0000000..c5db78c --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/customer_sf1000.sql @@ -0,0 +1,12 @@ +-- Inserting into customer +INSERT INTO customer +SELECT + c_custkey, + CAST(c_name AS VARCHAR(25)), + CAST(c_address AS VARCHAR(40)), + c_nationkey, + CAST(c_phone AS VARCHAR(15)), + CAST(c_acctbal AS DECIMAL(12,2)), + CAST(c_mktsegment AS VARCHAR(10)), + CAST(c_comment AS VARCHAR(117)) +FROM tpch.sf1000.customer; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/lineitem_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/lineitem_sf1000.sql new file mode 100644 index 0000000..0b69c82 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/lineitem_sf1000.sql @@ -0,0 +1,20 @@ +-- Inserting into lineitem +INSERT INTO lineitem +SELECT + l_orderkey, + l_partkey, + l_suppkey, + l_linenumber, + CAST(l_quantity AS DECIMAL(12,2)), + CAST(l_extendedprice AS DECIMAL(12,2)), + CAST(l_discount AS DECIMAL(12,2)), + CAST(l_tax AS DECIMAL(12,2)), + CAST(l_returnflag AS VARCHAR(1)), + CAST(l_linestatus AS VARCHAR(1)), + l_shipdate, + l_commitdate, + l_receiptdate, + CAST(l_shipinstruct AS VARCHAR(25)), + CAST(l_shipmode AS VARCHAR(10)), + CAST(l_comment AS VARCHAR(44)) +FROM tpch.sf1000.lineitem; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/nation_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/nation_sf1000.sql new file mode 100644 index 0000000..b358569 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/nation_sf1000.sql @@ -0,0 +1,8 @@ +-- Inserting into nation +INSERT INTO nation +SELECT + n_nationkey, + CAST(n_name AS VARCHAR(25)), + n_regionkey, + CAST(n_comment AS VARCHAR(152)) +FROM tpch.sf1000.nation; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/orders_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/orders_sf1000.sql new file mode 100644 index 0000000..0145de7 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/orders_sf1000.sql @@ -0,0 +1,13 @@ +-- Inserting into orders +INSERT INTO orders +SELECT + o_orderkey, + o_custkey, + CAST(o_orderstatus AS VARCHAR(1)), + CAST(o_totalprice AS DECIMAL(12,2)), + o_orderdate, + CAST(o_orderpriority AS VARCHAR(15)), + CAST(o_clerk AS VARCHAR(15)), + o_shippriority, + CAST(o_comment AS VARCHAR(79)) +FROM tpch.sf1000.orders; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/part_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/part_sf1000.sql new file mode 100644 index 0000000..fd88fa7 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/part_sf1000.sql @@ -0,0 +1,13 @@ +-- Inserting into part +INSERT INTO part +SELECT + p_partkey, + CAST(p_name AS VARCHAR(55)), + CAST(p_mfgr AS VARCHAR(25)), + CAST(p_brand AS VARCHAR(10)), + CAST(p_type AS VARCHAR(25)), + p_size, + CAST(p_container AS VARCHAR(10)), + CAST(p_retailprice AS DECIMAL(12,2)), + CAST(p_comment AS VARCHAR(23)) +FROM tpch.sf1000.part; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/partsupp_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/partsupp_sf1000.sql new file mode 100644 index 0000000..9ed1c43 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/partsupp_sf1000.sql @@ -0,0 +1,9 @@ +-- Inserting into partsupp +INSERT INTO partsupp +SELECT + ps_partkey, + ps_suppkey, + ps_availqty, + CAST(ps_supplycost AS DECIMAL(12,2)), + CAST(ps_comment AS VARCHAR(199)) +FROM tpch.sf1000.partsupp; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/region_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/region_sf1000.sql new file mode 100644 index 0000000..ca1fe51 --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/region_sf1000.sql @@ -0,0 +1,7 @@ +-- Inserting into region +INSERT INTO region +SELECT + r_regionkey, + CAST(r_name AS VARCHAR(25)), + CAST(r_comment AS VARCHAR(152)) +FROM tpch.sf1000.region; diff --git a/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/supplier_sf1000.sql b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/supplier_sf1000.sql new file mode 100644 index 0000000..d07786b --- /dev/null +++ b/benchmarks/tpch-load/from-tpch-to-parquet-n-1000/supplier_sf1000.sql @@ -0,0 +1,11 @@ +-- Inserting into supplier +INSERT INTO supplier +SELECT + s_suppkey, + CAST(s_name AS VARCHAR(25)), + CAST(s_address AS VARCHAR(40)), + s_nationkey, + CAST(s_phone AS VARCHAR(15)), + CAST(s_acctbal AS DECIMAL(12,2)), + CAST(s_comment AS VARCHAR(101)) +FROM tpch.sf1000.supplier; diff --git a/benchmarks/tpch-load/hive_sf100.json b/benchmarks/tpch-load/hive_sf100.json new file mode 100644 index 0000000..0690024 --- /dev/null +++ b/benchmarks/tpch-load/hive_sf100.json @@ -0,0 +1,5 @@ +{ + "description": "Specifies the schema for TPCH scale factor 100 GB.", + "catalog": "hive", + "schema": "load_tpch_sf100_parquet" +} diff --git a/benchmarks/tpch-load/hive_sf1000.json b/benchmarks/tpch-load/hive_sf1000.json new file mode 100644 index 0000000..c0828aa --- /dev/null +++ b/benchmarks/tpch-load/hive_sf1000.json @@ -0,0 +1,5 @@ +{ + "description": "Specifies the schema for TPCH scale factor 1000 GB.", + "catalog": "hive", + "schema": "load_tpch_sf1000_parquet" +} diff --git a/benchmarks/tpch-load/iceberg_sf100.json b/benchmarks/tpch-load/iceberg_sf100.json new file mode 100644 index 0000000..1be0bdf --- /dev/null +++ b/benchmarks/tpch-load/iceberg_sf100.json @@ -0,0 +1,5 @@ +{ + "description": "Specifies the schema for TPCH scale factor 100 GB.", + "catalog": "iceberg", + "schema": "load_tpch_sf100_parquet" +} diff --git a/benchmarks/tpch-load/iceberg_sf1000.json b/benchmarks/tpch-load/iceberg_sf1000.json new file mode 100644 index 0000000..ce090cd --- /dev/null +++ b/benchmarks/tpch-load/iceberg_sf1000.json @@ -0,0 +1,5 @@ +{ + "description": "Specifies the schema for TPCH scale factor 1000 GB.", + "catalog": "iceberg", + "schema": "load_tpch_sf1000_parquet" +} diff --git a/benchmarks/tpch-load/insert_sf1000_j.json b/benchmarks/tpch-load/insert_sf1000_j.json new file mode 100644 index 0000000..7ee1434 --- /dev/null +++ b/benchmarks/tpch-load/insert_sf1000_j.json @@ -0,0 +1,27 @@ +{ + "description": "Loading tpch with scaling factor 1000 to hive/iceberg parquet tables.", + "query_files": [ + "from-tpch-to-parquet-j-1000/customer_sf1000.sql", + "from-tpch-to-parquet-j-1000/lineitem_sf1000.sql", + "from-tpch-to-parquet-j-1000/nation_sf1000.sql", + "from-tpch-to-parquet-j-1000/orders_sf1000.sql", + "from-tpch-to-parquet-j-1000/part_sf1000.sql", + "from-tpch-to-parquet-j-1000/partsupp_sf1000.sql", + "from-tpch-to-parquet-j-1000/region_sf1000.sql", + "from-tpch-to-parquet-j-1000/supplier_sf1000.sql" + ], + "expected_row_counts": { + "load_tpch_sf1000_parquet": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } +} diff --git a/benchmarks/tpch-load/insert_sf1000_n.json b/benchmarks/tpch-load/insert_sf1000_n.json new file mode 100644 index 0000000..2dc537a --- /dev/null +++ b/benchmarks/tpch-load/insert_sf1000_n.json @@ -0,0 +1,27 @@ +{ + "description": "Loading tpch with scaling factor 1000 to hive/iceberg parquet tables.", + "query_files": [ + "from-tpch-to-parquet-n-1000/customer_sf1000.sql", + "from-tpch-to-parquet-n-1000/lineitem_sf1000.sql", + "from-tpch-to-parquet-n-1000/nation_sf1000.sql", + "from-tpch-to-parquet-n-1000/orders_sf1000.sql", + "from-tpch-to-parquet-n-1000/part_sf1000.sql", + "from-tpch-to-parquet-n-1000/partsupp_sf1000.sql", + "from-tpch-to-parquet-n-1000/region_sf1000.sql", + "from-tpch-to-parquet-n-1000/supplier_sf1000.sql" + ], + "expected_row_counts": { + "load_tpch_sf1000_parquet": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } +} diff --git a/benchmarks/tpch-load/insert_sf100_j.json b/benchmarks/tpch-load/insert_sf100_j.json new file mode 100644 index 0000000..cf55546 --- /dev/null +++ b/benchmarks/tpch-load/insert_sf100_j.json @@ -0,0 +1,27 @@ +{ + "description": "Loading tpch with scaling factor 100 to hive/iceberg parquet tables.", + "query_files": [ + "from-tpch-to-parquet-j-100/customer_sf100.sql", + "from-tpch-to-parquet-j-100/lineitem_sf100.sql", + "from-tpch-to-parquet-j-100/nation_sf100.sql", + "from-tpch-to-parquet-j-100/orders_sf100.sql", + "from-tpch-to-parquet-j-100/part_sf100.sql", + "from-tpch-to-parquet-j-100/partsupp_sf100.sql", + "from-tpch-to-parquet-j-100/region_sf100.sql", + "from-tpch-to-parquet-j-100/supplier_sf100.sql" + ], + "expected_row_counts": { + "load_tpch_sf100_parquet": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } +} diff --git a/benchmarks/tpch-load/insert_sf100_n.json b/benchmarks/tpch-load/insert_sf100_n.json new file mode 100644 index 0000000..9ae83f2 --- /dev/null +++ b/benchmarks/tpch-load/insert_sf100_n.json @@ -0,0 +1,27 @@ +{ + "description": "Loading tpch with scaling factor 100 to hive/iceberg parquet tables.", + "query_files": [ + "from-tpch-to-parquet-n-100/customer_sf100.sql", + "from-tpch-to-parquet-n-100/lineitem_sf100.sql", + "from-tpch-to-parquet-n-100/nation_sf100.sql", + "from-tpch-to-parquet-n-100/orders_sf100.sql", + "from-tpch-to-parquet-n-100/part_sf100.sql", + "from-tpch-to-parquet-n-100/partsupp_sf100.sql", + "from-tpch-to-parquet-n-100/region_sf100.sql", + "from-tpch-to-parquet-n-100/supplier_sf100.sql" + ], + "expected_row_counts": { + "load_tpch_sf100_parquet": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } +} diff --git a/benchmarks/tpch-load/prepare_sf100.json b/benchmarks/tpch-load/prepare_sf100.json new file mode 100644 index 0000000..4e1f37d --- /dev/null +++ b/benchmarks/tpch-load/prepare_sf100.json @@ -0,0 +1,27 @@ +{ + "description": "Loading tpch with scaling factor 100 to hive/iceberg parquet format tables.", + "query_files": [ + "schema/create_sf100.sql", + "create-table/customer.sql", + "create-table/lineitem.sql", + "create-table/nation.sql", + "create-table/orders.sql", + "create-table/part.sql", + "create-table/partsupp.sql", + "create-table/region.sql", + "create-table/supplier.sql" + ], + "expected_row_counts": { + "load_tpch_sf100_parquet": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } +} diff --git a/benchmarks/tpch-load/prepare_sf1000.json b/benchmarks/tpch-load/prepare_sf1000.json new file mode 100644 index 0000000..50ce223 --- /dev/null +++ b/benchmarks/tpch-load/prepare_sf1000.json @@ -0,0 +1,27 @@ +{ + "description": "Loading tpch with scaling factor 100 to hive/iceberg parquet format tables.", + "query_files": [ + "schema/create_sf1000.sql", + "create-table/customer.sql", + "create-table/lineitem.sql", + "create-table/nation.sql", + "create-table/orders.sql", + "create-table/part.sql", + "create-table/partsupp.sql", + "create-table/region.sql", + "create-table/supplier.sql" + ], + "expected_row_counts": { + "load_tpch_sf1000_parquet": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } +} diff --git a/benchmarks/tpch-load/schema/create_sf100.sql b/benchmarks/tpch-load/schema/create_sf100.sql new file mode 100644 index 0000000..bc228a8 --- /dev/null +++ b/benchmarks/tpch-load/schema/create_sf100.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA IF NOT EXISTS load_tpch_sf100_parquet WITH (LOCATION = concat('s3a://presto-workload-testing-95ced98/native_load_tpch_sf100_parquet_', + format_datetime(current_timestamp, 'yyyyMMdd_HHmmss'), '/')); +USE load_tpch_sf100_parquet; diff --git a/benchmarks/tpch-load/schema/create_sf1000.sql b/benchmarks/tpch-load/schema/create_sf1000.sql new file mode 100644 index 0000000..69ae1b1 --- /dev/null +++ b/benchmarks/tpch-load/schema/create_sf1000.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA IF NOT EXISTS load_tpch_sf1000_parquet WITH (LOCATION = concat('s3a://presto-workload-testing-95ced98/native_load_tpch_sf1000_parquet_', + format_datetime(current_timestamp, 'yyyyMMdd_HHmmss'), '/')); +USE load_tpch_sf1000_parquet; diff --git a/benchmarks/tpch-load/schema/drop_sf100.sql b/benchmarks/tpch-load/schema/drop_sf100.sql new file mode 100644 index 0000000..dc93a17 --- /dev/null +++ b/benchmarks/tpch-load/schema/drop_sf100.sql @@ -0,0 +1 @@ +drop schema load_tpch_sf100_parquet; diff --git a/benchmarks/tpch-load/schema/drop_sf1000.sql b/benchmarks/tpch-load/schema/drop_sf1000.sql new file mode 100644 index 0000000..babbbed --- /dev/null +++ b/benchmarks/tpch-load/schema/drop_sf1000.sql @@ -0,0 +1 @@ +drop schema load_tpch_sf1000_parquet;