[ 
https://issues.apache.org/jira/browse/HIVE-26911?focusedWorklogId=838236&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-838236
 ]

ASF GitHub Bot logged work on HIVE-26911:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jan/23 08:26
            Start Date: 10/Jan/23 08:26
    Worklog Time Spent: 10m 
      Work Description: dengzhhu653 commented on code in PR #3920:
URL: https://github.com/apache/hive/pull/3920#discussion_r1065464822


##########
ql/src/test/queries/clientpositive/rename_translated_external_table.q:
##########
@@ -0,0 +1,18 @@
+set 
metastore.metadata.transformer.class=org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer;
+set hive.fetch.task.conversion=none;
+set hive.compute.query.using.stats=false;
+
+create database if not exists tmp;
+
+use tmp;
+
+create table b(s string) stored as parquet location 
'file:${system:test.tmp.dir}/tmp.db/some_location';
+
+desc formatted b;

Review Comment:
   Output of the query does not show the details about the location, so I think 
it better to do like this:
   ```sql
   insert into table b values('a'),('b'),('c');
   select * from b;
   ```
   after renaming b to bb, then
   ```
   select * from bb;
   

Issue Time Tracking
-------------------

    Worklog Id:     (was: 838236)
    Time Spent: 1h 10m  (was: 1h)

> Renaming a translated external table with a specified location fails with 
> 'location already exists' exception
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-26911
>                 URL: https://issues.apache.org/jira/browse/HIVE-26911
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>    Affects Versions: 4.0.0
>            Reporter: Sai Hemanth Gantasala
>            Assignee: Sai Hemanth Gantasala
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Renaming a translated external table with a specified location fails with 
> 'location already exists' exception.
> Below are steps for repro
> {code:java}
> create database tmp;
> use tmp;
> create table b(s string) stored as parquet location 
> 'hdfs://localhost:20500/test-warehouse/tmp.db/some_location';
> alter table b rename to bb;
> ERROR: InvalidOperationException: New location for this table hive.tmp.bb 
> already exists : hdfs://localhost:20500/test-warehouse/tmp.db/some_location 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to