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/07/04 04:54:05 UTC
[GitHub] [hive] dengzhhu653 commented on a diff in pull request #3221: HIVE-25779: Deduplicate SerDe Info
dengzhhu653 commented on code in PR #3221:
URL: https://github.com/apache/hive/pull/3221#discussion_r912625118
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -4959,13 +4993,20 @@ public Table alterTable(String catName, String dbname, String name, Table newTab
oldt.setOwnerType(newt.getOwnerType());
// Fully copy over the contents of the new SD into the old SD,
// so we don't create an extra SD in the metastore db that has no references.
- MColumnDescriptor oldCD = null;
MStorageDescriptor oldSD = oldt.getSd();
+ MColumnDescriptor oldCD = null;
+ MSerDeInfo oldSerDeInfo = null;
if (oldSD != null) {
oldCD = oldSD.getCD();
+ oldSerDeInfo = oldSD.getSerDeInfo();
}
copyMSD(newt.getSd(), oldt.getSd());
- removeUnusedColumnDescriptor(oldCD);
+ if (oldSD != null && oldSD.getCD() != oldCD) {
+ removeUnusedColumnDescriptor(oldCD);
+ }
+ if (oldSD != null && oldSD.getSerDeInfo() != oldSerDeInfo) {
Review Comment:
it seems that oldSD.getSerDeInfo() always be oldSerDeInfo
--
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