[ https://issues.apache.org/jira/browse/HIVE-8719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14195624#comment-14195624 ]
Sushanth Sowmyan commented on HIVE-8719: ---------------------------------------- Interestingly, if I write a .q to test this, (and changing QTestUtil to not mask out the location), I do not notice this. This happens only in a deployed cluster. Thus, I do not currently have a unit test for it, but we have a trivially simple reproducer as above. > LoadSemanticAnalyzer ignores previous partition location if inserting into > partition that already exists > -------------------------------------------------------------------------------------------------------- > > Key: HIVE-8719 > URL: https://issues.apache.org/jira/browse/HIVE-8719 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.14.0 > Reporter: Sushanth Sowmyan > > LOAD DATA INSERT INTO seems to be broken currently for partitions that do not > use hive's native directory structure naming scheme, thus ignoring any > location previously set by an ALTER TABLE ADD PARTITION ... LOCATION ... > command. > Here is a simple reproducer: > {noformat} > echo 1 > /tmp/data1.txt > hive -e "create external table testpart(id int) partitioned by (date string) > location '/tmp/testpart';" > hive -e "alter table testpart add partition(date='2014-09-16') location > '/tmp/testpart/20140916';" > hive -e "describe formatted testpart partition(date='2014-09-16') ;" | egrep > '/tmp/testpart/(date=.?)?2014-?09-?16' > /tmp/a > hive -e "load data local inpath '/tmp/data1.txt' into table testpart > partition(date='2014-09-16');" > hive -e "describe formatted testpart partition(date='2014-09-16') ;" | egrep > '/tmp/testpart/(date=.?)?2014-?09-?16' > /tmp/b > diff /tmp/a /tmp/b > hadoop fs -ls /tmp/testpart/ > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)