kgyrtkirk commented on a change in pull request #2089:
URL: https://github.com/apache/hive/pull/2089#discussion_r608793866



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -2419,9 +2419,9 @@ private void create_table_core(final RawStore ms, final 
CreateTableRequest req)
       }
 
       if (!TableType.VIRTUAL_VIEW.toString().equals(tbl.getTableType())) {
-        if (tbl.getSd().getLocation() == null
-            || tbl.getSd().getLocation().isEmpty()) {
-          tblPath = wh.getDefaultTablePath(db, tbl);
+        if (tbl.getSd().getLocation() == null || 
tbl.getSd().getLocation().isEmpty()) {
+          String relPath = tbl.getTableName() + (tbl.isSetTxnId() ? "_v" + 
tbl.getTxnId() : "");
+          tblPath = wh.getDefaultTablePath(db, relPath, isExternal(tbl));

Review comment:
       can't we have a variation of this method which accepts a full "table" - 
and can decide the path ; and the externalability based on that...so that we 
don't spread the above line everywhere this method is invoked (I'm also working 
on a patch which invokes this method)

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -2419,9 +2419,9 @@ private void create_table_core(final RawStore ms, final 
CreateTableRequest req)
       }
 
       if (!TableType.VIRTUAL_VIEW.toString().equals(tbl.getTableType())) {

Review comment:
       this conditional doesn't seem to only match "managed" tables - could 
that cause any issues?
   
   with the "translator" in place I think we are mangling the location at too 
many places...




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to