Github user blrunner commented on the pull request:
https://github.com/apache/tajo/pull/624#issuecomment-137522218
I've finished tests successfully for this PR as following:
* Data: TPC-H benchmark set (scale factor = 1)
* CatalogStore: MySQLStore, HiveCatalogStore(with apache hive 1.1.0)
* CTAS for creating partition tables (except partsupp)
```
CREATE TABLE LINEITEM_P (
L_ORDERKEY bigint, L_PARTKEY bigint, L_SUPPKEY bigint, L_LINENUMBER bigint,
L_QUANTITY double, L_EXTENDEDPRICE double, L_DISCOUNT double, L_TAX double,
L_RETURNFLAG text, L_LINESTATUS text,L_COMMITDATE date, L_RECEIPTDATE date,
L_SHIPINSTRUCT text, L_SHIPMODE text, L_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN (L_SHIPDATE date) AS
SELECT L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_LINENUMBER, L_QUANTITY,
L_EXTENDEDPRICE, L_DISCOUNT, L_TAX, L_RETURNFLAG, L_LINESTATUS, L_COMMITDATE,
L_RECEIPTDATE, L_SHIPINSTRUCT, L_SHIPMODE, L_COMMENT, L_SHIPDATE FROM LINEITEM;
create table customer_p (C_CUSTKEY bigint, C_NAME text, C_ADDRESS text,
C_PHONE text, C_ACCTBAL double, C_MKTSEGMENT text, C_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN (C_NATIONKEY bigint) AS
SELECT C_CUSTKEY, C_NAME, C_ADDRESS, C_PHONE, C_ACCTBAL, C_MKTSEGMENT,
C_COMMENT, C_NATIONKEY FROM customer;
create  table supplier_p (S_SUPPKEY bigint, S_NAME text, S_ADDRESS text,
S_PHONE text, S_ACCTBAL double, S_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN ( S_NATIONKEY bigint) AS
SELECT S_SUPPKEY, S_NAME, S_ADDRESS, S_PHONE, S_ACCTBAL, S_COMMENT,
S_NATIONKEY FROM supplier;
create  table part_p (P_PARTKEY bigint, P_NAME text, P_MFGR text, P_BRAND
text, P_TYPE text, P_CONTAINER text, P_RETAILPRICE double, P_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN (P_SIZE integer) AS
SELECT P_PARTKEY, P_NAME, P_MFGR, P_BRAND, P_TYPE, P_CONTAINER,
P_RETAILPRICE, P_COMMENT, P_SIZE FROM part;
create table orders_p (O_ORDERKEY bigint, O_CUSTKEY bigint, O_ORDERSTATUS
text, O_TOTALPRICE double, O_ORDERPRIORITY text, O_CLERK text, O_SHIPPRIORITY
int, O_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN (O_ORDERDATE date) AS
SELECT O_ORDERKEY, O_CUSTKEY, O_ORDERSTATUS, O_TOTALPRICE, O_ORDERPRIORITY,
O_CLERK, O_SHIPPRIORITY, O_COMMENT, O_ORDERDATE FROM orders;
create table nation_p (N_NATIONKEY bigint, N_NAME text, N_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN (N_REGIONKEY bigint) AS
SELECT N_NATIONKEY, N_NAME, N_COMMENT, N_REGIONKEY FROM nation;
create table region_p ( R_NAME text, Â R_COMMENT text)
USING TEXT WITH ('text.delimiter'='|')
PARTITION BY COLUMN (R_REGIONKEY bigint) AS
SELECT R_NAME, Â R_COMMENT, R_REGIONKEY FROM region;
```
* Test Queries : TPC-H Q1 ~ Q22
After executing CTAS statements, I fount that list of table partitions had
been printed on hive shell. All test results mostly accorded with results of
queries for non-partitoned tables in MySQLStore and HiveCatalogStore. But some
records for double type record aggregation were slightly different in the
nearest whole number, To resolve above problem, we need to provide decimal
column type.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---