[ https://issues.apache.org/jira/browse/HIVE-3939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15342662#comment-15342662 ]
Xiao Yu edited comment on HIVE-3939 at 6/21/16 9:06 PM: -------------------------------------------------------- [~navis] It appears this was a regression I'm currently on version 1.1.0 and can still reproduce this issue on both partitioned and non-partitioned tables. Issuing a `USE database;` then using non database prefixed table names works. was (Author: xyu): [~navis] It appears this was fixed by HIVE-3465 for partitioned tables however I can still reproduce the `database.table` overwriting problem with a non-partitioned table. (Version 1.1.0) > 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 was sent by Atlassian JIRA (v6.3.4#6332)