hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matan Vardi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-17221) Error: Error while compiling statement: FAILED: IndexOutOfBoundsException Index: 4, Size: 2 (state=42000,code=40000)
Date Tue, 01 Aug 2017 03:17:00 GMT
Matan Vardi created HIVE-17221:
----------------------------------

             Summary: Error: Error while compiling statement: FAILED: IndexOutOfBoundsException
Index: 4, Size: 2 (state=42000,code=40000)
                 Key: HIVE-17221
                 URL: https://issues.apache.org/jira/browse/HIVE-17221
             Project: Hive
          Issue Type: Bug
          Components: Hive
    Affects Versions: 2.1.1
         Environment: Amazon EMR 5.4 or any version where Hive 2.1.1 is used.
            Reporter: Matan Vardi


Run the following queries in beeline:
Observed that is a regression and used to work in Hive 1.x.
---- 

!connect jdbc:hive2://localhost:10000/default (Login as hive/hive)
 
SET hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;

SET hive.support.concurrency=true;
SET hive.enforce.bucketing=true;
SET hive.exec.dynamic.partition.mode=nonstrict;



create table orders_bkt1 (
 O_ORDERKEY DOUBLE,
 O_CUSTKEY DOUBLE,
 O_TOTALPRICE DOUBLE,
 O_ORDERDATE STRING, 
 O_ORDERPRIORITY STRING,
 O_CLERK STRING,
 O_SHIPPRIORITY DOUBLE,
 O_COMMENT STRING)
PARTITIONED BY (
O_ORDERSTATUS STRING)
CLUSTERED BY (O_ORDERPRIORITY) INTO 6 BUCKETS
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '|' STORED AS ORC
TBLPROPERTIES ("transactional"="true");

create table orders_src (
O_ORDERKEY DOUBLE,
O_CUSTKEY DOUBLE,
O_ORDERSTATUS STRING,
O_TOTALPRICE DOUBLE,
O_ORDERDATE STRING,
O_ORDERPRIORITY STRING,
O_CLERK STRING,
O_SHIPPRIORITY DOUBLE,
O_COMMENT STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE;


Insert into orders_src values (1.5,2.5,"PENDING",15.5,"10/25/2017","low","clerk", 1.0,"comment");
CREATE TABLE IF NOT EXISTS w2834719472743385761_update_strategy_m_orders_updtx_50percent (a0
DOUBLE, a1 DOUBLE, a2 STRING, a3 DOUBLE, a4 STRING, a5 STRING, a6 STRING, a7 DOUBLE, a8 STRING)
CLUSTERED BY (a0, a1, a2, a3, a4, a5, a6, a7, a8) INTO 32 BUCKETS STORED AS ORC TBLPROPERTIES
('transactional'='true');


INSERT INTO TABLE w2834719472743385761_update_strategy_m_orders_updtx_50percent SELECT alias.o_orderkey
as a0, alias.o_custkey as a1, alias.o_orderstatus as a2, 10 + alias.o_totalprice as a3, alias.o_orderdate
as a4, alias.o_orderpriority as a5, alias.o_clerk as a6, alias.o_shippriority as a7, alias.o_comment
as a8 FROM orders_src alias;



CREATE TABLE IF NOT EXISTS w2834719472743385761_write_orders_bkt_src_tmp_m_orders_updtx_50percent
(a0 DOUBLE, a1 DOUBLE, a2 DOUBLE, a3 STRING, a4 STRING, a5 STRING, a6 DOUBLE, a7 STRING, a8
STRING) CLUSTERED BY (a0) INTO 32 BUCKETS STORED AS ORC TBLPROPERTIES ('transactional'='true');


INSERT INTO TABLE w2834719472743385761_write_orders_bkt_src_tmp_m_orders_updtx_50percent SELECT
w2834719472743385761_update_strategy_m_orders_updtx_50percent.a0 as a0, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a1
as a1, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a3 as a2, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a4
as a3, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a5 as a4, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a6
as a5, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a7 as a6, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a8
as a7, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a2 as a8 FROM w2834719472743385761_update_strategy_m_orders_updtx_50percent
WHERE (CASE WHEN w2834719472743385761_update_strategy_m_orders_updtx_50percent.a2 = 'P' THEN
1 ELSE 0 END) = 1;


CREATE TABLE IF NOT EXISTS w2834719472743385761_write_orders_bkt_tgt_tmp_m_orders_updtx_50percent
(a0 DOUBLE, a1 DOUBLE, a2 DOUBLE, a3 STRING, a4 STRING, a5 STRING, a6 DOUBLE, a7 STRING, a8
STRING) CLUSTERED BY (a0) INTO 32 BUCKETS STORED AS ORC TBLPROPERTIES ('transactional'='true');


INSERT INTO TABLE w2834719472743385761_write_orders_bkt_tgt_tmp_m_orders_updtx_50percent SELECT
orders_bkt1.o_orderkey as a0, orders_bkt1.o_custkey as a1, orders_bkt1.o_totalprice as a2,
orders_bkt1.o_orderdate as a3, orders_bkt1.o_orderpriority as a4, orders_bkt1.o_clerk as a5,
orders_bkt1.o_shippriority as a6, orders_bkt1.o_comment as a7, orders_bkt1.o_orderstatus as
a8 FROM w2834719472743385761_write_orders_bkt_src_tmp_m_orders_updtx_50percent JOIN orders_bkt1
ON (w2834719472743385761_write_orders_bkt_src_tmp_m_orders_updtx_50percent.a0 = orders_bkt1.o_orderkey);


DELETE FROM orders_bkt1 WHERE EXISTS  (SELECT w2834719472743385761_update_strategy_m_orders_updtx_50percent.a0
as a0, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a1 as a1, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a3
as a2, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a4 as a3, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a5
as a4, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a6 as a5, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a7
as a6, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a8 as a7, w2834719472743385761_update_strategy_m_orders_updtx_50percent.a2
as a8 FROM w2834719472743385761_update_strategy_m_orders_updtx_50percent WHERE (((CASE WHEN
w2834719472743385761_update_strategy_m_orders_updtx_50percent.a2 = 'P' THEN 1 ELSE 0 END)
= 1) OR ((CASE WHEN w2834719472743385761_update_strategy_m_orders_updtx_50percent.a2 = 'P'
THEN 1 ELSE 0 END) = 2)) AND (orders_bkt1.o_orderkey = w2834719472743385761_update_strategy_m_orders_updtx_50percent.a0));

The result is :

Error: Error while compiling statement: FAILED: IndexOutOfBoundsException Index: 4, Size:
2 (state=42000,code=40000)




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message