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

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

                Author: ASF GitHub Bot
            Created on: 10/May/21 17:04
            Start Date: 10/May/21 17:04
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on a change in pull request #2191:
URL: https://github.com/apache/hive/pull/2191#discussion_r629526765



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -558,6 +566,39 @@ public MetastoreDefaultTransformer(IHMSHandler handler) 
throws HiveMetaException
     return ret;
   }
 
+  static enum TableLocationStrategy {
+    seqsuffix {
+      @Override
+      Path getLocation(IHMSHandler hmsHandler, Database db, Table table, int 
idx) throws MetaException {
+        if (idx == 0) {
+          return getDefaultPath(hmsHandler, db, table.getTableName());
+        }
+        return getDefaultPath(hmsHandler, db, table.getTableName() + "-" + 
idx);

Review comment:
       there is logic behind this naming schema as well - I think it's better 
to have an option to choose this as well ; I've added this as `seqprefix`
   I've modified to use `_` as the separator
   
   I wonder which one should be the default behaviour? "seqsuffix", "seqprefix" 
or "prohibit"
   I'm fine with either the prefix or suffix one; but I would like to avoid 
prohibit as the default




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 594114)
    Time Spent: 40m  (was: 0.5h)

> TRANSLATED_TO_EXTERNAL tables may write to the same location
> ------------------------------------------------------------
>
>                 Key: HIVE-24920
>                 URL: https://issues.apache.org/jira/browse/HIVE-24920
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code}
> create table t (a integer);
> insert into t values(1);
> alter table t rename to t2;
> create table t (a integer); -- I expected an exception from this command 
> (location already exists) but because its an external table no exception
> insert into t values(2);
> select * from t;  -- shows 1 and 2
> drop table t2;    -- wipes out data location
> select * from t;  -- empty resultset
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to