You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/09/15 08:46:41 UTC

[GitHub] [hive] veghlaci05 commented on a diff in pull request #3557: HIVE-26504: User is not able to drop table

veghlaci05 commented on code in PR #3557:
URL: https://github.com/apache/hive/pull/3557#discussion_r971706620


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -235,6 +235,10 @@ public void alterTable(RawStore msdb, Warehouse wh, String catName, String dbnam
 
       boolean renamedTranslatedToExternalTable = rename && MetaStoreUtils.isTranslatedToExternalTable(oldt)
           && MetaStoreUtils.isTranslatedToExternalTable(newt);
+
+      List<ColumnStatistics> columnStatistics = getColumnStats(msdb, oldt);
+      columnStatistics = deleteTableColumnStats(msdb, oldt, newt, columnStatistics);

Review Comment:
   deleteAllPartitionColumnStatistics is used only in one specific case: [HIVE-23959](https://issues.apache.org/jira/browse/HIVE-23959): Provide an option to wipe out column stats for partitioned tables in case of column removal
   
   So I don't think we should call this method in all cases. However, it made me think that in this particular case the table column statistics should not be re-added at the end. What do you think?



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org