nrg4878 commented on code in PR #4752:
URL: https://github.com/apache/hive/pull/4752#discussion_r1343168150


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -679,7 +679,9 @@ public Partition alterPartition(RawStore msdb, Warehouse 
wh, String catName, Str
       // 1) partition SD Location
       // 2) partition column stats if there are any because of part_name field 
in HMS table PART_COL_STATS
       // 3) rename the partition directory if it is not an external table
-      if (!tbl.getTableType().equals(TableType.EXTERNAL_TABLE.toString())) {
+      boolean shouldMoveData = !(MetaStoreUtils.isExternalTable(tbl) &&
+          !MetaStoreUtils.isPropertyTrue(tbl.getParameters(), 
"TRANSLATED_TO_EXTERNAL"));

Review Comment:
   only the ones thats are translated. We are trying to retain the legacy 
behavior. For tables created with "CREATE EXTERNAL", we assume that the 
partition's location is being written to or read from by external "processes". 
Does this make sense?



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

To unsubscribe, e-mail: [email protected]

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