sheetalshah1007 opened a new pull request, #593:
URL: https://github.com/apache/atlas/pull/593

   
   ## What changes were proposed in this pull request?
   
   **The Problem**
   Apache Atlas allows two different relationship types (e.g., 
`hive_table_columns` and `rdbms_table_columns`) to share the same attribute 
name (e.g., `columns`) on an entity type. During export, `EntityGraphRetriever` 
called `mapVertexToRelationshipAttribute()`, which was only designed to handle 
one relationship type per attribute name. When an entity had an attribute 
backed by multiple relationship types, the retriever would silently process 
only the first one it found, causing the exported data to be incomplete or 
incorrect — effectively an export failure for those entities.
   
   **How the Patch Resolves It**
   The fix introduces a `processMultipleRelationshipTypes` flag on 
`EntityGraphRetriever`. When `ExportService` constructs the retriever, it now 
passes true for this flag:
   
   `new EntityGraphRetriever(graph, typeRegistry, false, true);
   `With the flag enabled, for each relationship attribute the retriever calls 
the new `mapVertexToRelationshipAttributeWithMultipleTypes() `method, which 
fetches related vertices for **all** registered relationship types for that 
attribute and merges them into a single complete result.
   
   **Note**: This fix is currently scoped to `ExportService` only. All other 
callers still use the old constructor with 
`processMultipleRelationshipTypes=false `and will silently return incomplete 
relationship data when multiple relationship types share an attribute name.
   
   ## How was this patch tested?
   
   Tested the export service across multiple scenarios involving a mix of table 
types (such as managed and external tables) within a database.
   


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