Commit b96ce272 by Sarath Subramanian

ATLAS-3380: Regression: After moving a table to a different database , db…

ATLAS-3380: Regression: After moving a table to a different database , db attribute in the table entity still points to the old db
parent 8c136a86
......@@ -169,7 +169,8 @@ public class AlterTableRename extends BaseHiveEvent {
private void renameStorageDesc(AtlasEntityWithExtInfo oldEntityExtInfo, AtlasEntityWithExtInfo newEntityExtInfo, List<HookNotification> notifications) {
AtlasEntity oldSd = getStorageDescEntity(oldEntityExtInfo);
AtlasEntity newSd = getStorageDescEntity(newEntityExtInfo);
AtlasEntity newSd = new AtlasEntity(getStorageDescEntity(newEntityExtInfo)); // make a copy of newSd, since we will be setting relationshipAttributes to 'null' below
// and we need relationship attributes later during entity full update
if (oldSd != null && newSd != null) {
AtlasObjectId oldSdId = new AtlasObjectId(oldSd.getTypeName(), ATTRIBUTE_QUALIFIED_NAME, oldSd.getAttribute(ATTRIBUTE_QUALIFIED_NAME));
......
......@@ -201,6 +201,8 @@ public class AtlasEntity extends AtlasStruct implements Serializable {
setUpdateTime(other.getUpdateTime());
setVersion(other.getVersion());
setClassifications(other.getClassifications());
setRelationshipAttributes(other.getRelationshipAttributes());
setMeanings(other.getMeanings());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment