You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "mohan dharmarajan (JIRA)" <ji...@apache.org> on 2013/01/25 01:11:12 UTC
[jira] [Created] (HIVE-3939) INSERT INTO behaves like INSERT
OVERWRITE if the table name referred is not all lowercase
mohan dharmarajan created HIVE-3939:
---------------------------------------
Summary: INSERT INTO behaves like INSERT OVERWRITE if the table name referred is not all lowercase
Key: HIVE-3939
URL: https://issues.apache.org/jira/browse/HIVE-3939
Project: Hive
Issue Type: Bug
Components: Database/Schema
Affects Versions: 0.9.0
Environment: Windows 2012, HDInsight
Reporter: mohan dharmarajan
If table referred does not use all lowercase in INSERT INTO command, the data is not appended but overwritten.
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.dynamic.partition=true;
CREATE TABLE test (key int, value string) PARTITIONED BY (ds string);
SELECT * FROM test;
INSERT INTO TABLE test PARTITION (ds) SELECT key, value, value FROM src;
SELECT * FROM test;
The following statement works as expected. The data from src is appended to test
SELECT * FROM test;
INSERT INTO TABLE test PARTITION (ds) SELECT key, value, value FROM src;
SELECT * FROM test;
The following is copied from the processing log
Loading data to table default.test partition (ds=null)
Loading partition {ds=1}
Loading partition {ds=2}
The following statement does not work. Note the table name referred as Test (not test). INSERT INTO behaves like INSERT OVERWRITE
SELECT * FROM test;
INSERT INTO TABLE Test PARTITION (ds) SELECT key, value, value FROM src;
SELECT * FROM test;
The following is copied from the processing log
Loading data to table default.test partition (ds=null)
Moved to trash: hdfs://localhost:8020/hive/warehouse/test/ds=1
Moved to trash: hdfs://localhost:8020/hive/warehouse/test/ds=2
Loading partition {ds=1}
Loading partition {ds=2}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira