Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Private Beta
-
None
-
None
Description
Trying to do some test with TPCH data. I did the following:
Create external table lineitem_text (L_ORDERKEY INT, L_PARTKEY INT, L_SUPPKEY INT, L_LINENUMBER INT, L_QUANTITY DOUBLE, L_EXTENDEDPRICE DOUBLE, L_DISCOUNT DOUBLE, L_TAX DOUBLE, L_RETURNFLAG STRING, L_LINESTATUS STRING, L_SHIPDATE STRING, L_COMMITDATE STRING, L_RECEIPTDATE STRING, L_SHIPINSTRUCT STRING, L_SHIPMODE STRING, L_COMMENT STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE LOCATION '/tpch/lineitem'; select count(*) from lineitem_text; create table lineitem_kudu (L_ORDERKEY INT, L_LINENUMBER INT, L_PARTKEY INT, L_SUPPKEY INT, L_QUANTITY DOUBLE, L_EXTENDEDPRICE DOUBLE, L_DISCOUNT DOUBLE, L_TAX DOUBLE, L_RETURNFLAG STRING, L_LINESTATUS STRING, L_SHIPDATE STRING, L_COMMITDATE STRING, L_RECEIPTDATE STRING, L_SHIPINSTRUCT STRING, L_SHIPMODE STRING, L_COMMENT STRING) TBLPROPERTIES( 'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler', 'kudu.table_name' = 'lineitem_kudu', 'kudu.master_addresses' = 'localhost:7051', 'kudu.key_columns' = 'L_ORDERKEY, L_LINENUMBER' ); INSERT INTO lineitem_kudu SELECT L_ORDERKEY, L_LINENUMBER, L_PARTKEY, L_SUPPKEY, L_QUANTITY , L_EXTENDEDPRICE , L_DISCOUNT , L_TAX , L_RETURNFLAG , L_LINESTATUS , L_SHIPDATE , L_COMMITDATE , L_RECEIPTDATE , L_SHIPINSTRUCT , L_SHIPMODE , L_COMMENT FROM lineitem_text;
and got:
ERROR: AnalysisException: Some key columns were not found in the set of columns. List of column names: [l_shipdate, l_shipmode, l_partkey, l_commitdate, l_returnflag, l_tax, l_quantity, l_linestatus, l_comment, l_extendedprice, l_orderkey, l_receiptdate, l_discount, l_shipinstruct, l_linenumber, l_suppkey], List of key column names: [L_ORDERKEY, L_LINENUMBER] CAUSED BY: TableLoadingException: Some key columns were not found in the set of columns. List of column names: [l_shipdate, l_shipmode, l_partkey, l_commitdate, l_returnflag, l_tax, l_quantity, l_linestatus, l_comment, l_extendedprice, l_orderkey, l_receiptdate, l_discount, l_shipinstruct, l_linenumber, l_suppkey], List of key column names: [L_ORDERKEY, L_LINENUMBER]