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