sheetalshah1007 commented on code in PR #478:
URL: https://github.com/apache/atlas/pull/478#discussion_r3186094643


##########
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java:
##########
@@ -1533,6 +1527,88 @@ private void mapRelationshipAttributes(AtlasEntity 
entity, AtlasEntityType entit
         LOG.debug("<== mapRelationshipAttributes({}, {})", op, 
entity.getTypeName());
     }
 
+    private void mapRelationshipAttribute(AtlasEntity entity, AtlasEntityType 
entityType, String attrName, Object attrValue, AtlasVertex vertex, 
EntityOperation op, EntityMutationContext context) throws AtlasBaseException {
+        LOG.debug("==> mapRelationshipAttribute({}, {})", attrName, 
entity.getTypeName());
+        Set<String> relationshipTypeNames = 
entityType.getAttributeRelationshipTypes(attrName);
+
+        if (CollectionUtils.isEmpty(relationshipTypeNames)) {

Review Comment:
   Since one method that mixes “how many defs” with “instanceof Collection/Map” 
would become a long condition that’s harder to name, test, and reuse; i have 
split the logic into  `isAttributeWithMultipleRelationshipTypes`() and 
`shouldMapRelationshipAttributeUsingInferredType`() as they are different 
concerns



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

Reply via email to