saihemanth-cloudera commented on code in PR #3221:
URL: https://github.com/apache/hive/pull/3221#discussion_r924689709
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -5322,16 +5380,25 @@ private void copyMSD(MStorageDescriptor newSd,
MStorageDescriptor oldSd) {
oldSd.setCD(newSd.getCD());
}
}
+ // If the serde info of the old SD != the serde info of the new one,
+ // then we set the serde info of the old SD as the new serde info.
+ SerDeInfo oldSerDeInfo = null;
+ SerDeInfo newSerDeInfo = null;
+ try {
+ oldSerDeInfo = convertToSerDeInfo(oldSd.getSerDeInfo(), true);
+ newSerDeInfo = convertToSerDeInfo(newSd.getSerDeInfo(), true);
+ } catch (MetaException e) {
+ LOG.debug("convertToSerDeInfo shouldn't throw MetaException when
allowNull is set to true");
+ }
+ if (oldSerDeInfo == null || !oldSerDeInfo.equals(newSerDeInfo)) {
+ oldSd.setSerDeInfo(newSd.getSerDeInfo());
Review Comment:
can we reuse the variable from L5389?
--
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]