You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Frank Luo (JIRA)" <ji...@apache.org> on 2016/07/19 14:56:20 UTC

[jira] [Created] (HIVE-14280) tez insert fails when union all the table itself

Frank Luo created HIVE-14280:
--------------------------------

             Summary: tez insert fails when union all the table itself
                 Key: HIVE-14280
                 URL: https://issues.apache.org/jira/browse/HIVE-14280
             Project: Hive
          Issue Type: Bug
          Components: Tez
    Affects Versions: 1.2.1
         Environment: hdp 2.3.4.7 on red hat 6
            Reporter: Frank Luo


It is very common in Hive world to "append" data to a table by inserting some data, and do a "union all" with the same table. However the query works in M/R but not tez. 

Here is a sample to recreate the issue:

CREATE TABLE tmp_table
(
   grp    STRING,
   size   INT
);

insert into table tmp_table values
('a',1);

--this query will fail
insert overwrite table tmp_table
select * from tmp_table a
union all 
select * from tmp_table b;

Here is the error:


ERROR : Failed with exception checkPaths: hdfs://nameservice1/apps/hive/warehouse/jluo.db/tmp_table/.hive-staging_hive_2016-07-19_10-48-15_971_8813032872646179391-4161/-ext-10000 has nested directory hdfs://nameservice1/apps/hive/warehouse/jluo.db/tmp_table/.hive-staging_hive_2016-07-19_10-48-15_971_8813032872646179391-4161/-ext-10000/1
org.apache.hadoop.hive.ql.metadata.HiveException: checkPaths: hdfs://nameservice1/apps/hive/warehouse/jluo.db/tmp_table/.hive-staging_hive_2016-07-19_10-48-15_971_8813032872646179391-4161/-ext-10000 has nested directory hdfs://nameservice1/apps/hive/warehouse/jluo.db/tmp_table/.hive-staging_hive_2016-07-19_10-48-15_971_8813032872646179391-4161/-ext-10000/1
	at org.apache.hadoop.hive.ql.metadata.Hive.checkPaths(Hive.java:2491)
	at org.apache.hadoop.hive.ql.metadata.Hive.replaceFiles(Hive.java:2905)
	at org.apache.hadoop.hive.ql.metadata.Hive.loadTable(Hive.java:1659)
	at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:298)
	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)