Karen Coppage created HIVE-22646:
------------------------------------
Summary: CTASing a dynamically partitioned MM table results in
unreadable table
Key: HIVE-22646
URL: https://issues.apache.org/jira/browse/HIVE-22646
Project: Hive
Issue Type: Bug
Reporter: Karen Coppage
Assignee: Karen Coppage
Repro steps:
{code:java}
create table plain (i int, j int, s string);
insert into plain values (1,1,'1');
create table ctas partitioned by (s) tblproperties ('transactional'='true',
'transactional_properties' = 'insert_only') as select * from plain;
select * from ctas;
{code}
We get this error:
{code:java}
Error: java.io.IOException: java.io.IOException: Not a file:
file:/Users/karencoppage/data/upstream/warehouse/ctas/s=1/delta_0000002_0000002_0000/delta_0000002_0000002_0000
(state=,code=0){code}
This also happens when CTASing from a dynamically partitioned table.
As seen in the error message, the issue is that a new delta directory is
created in the temp directory, and during MoveTask another delta dir is
unnecessarily created, then the first delta dir is moved into the second. The
table is unreadable since a file and not another delta dir is expected in the
top delta dir.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)