ATLAS-5156: Import failure due to missing support for handling multip…#478
Open
sheetalshah1007 wants to merge 5 commits intoapache:masterfrom
Open
ATLAS-5156: Import failure due to missing support for handling multip…#478sheetalshah1007 wants to merge 5 commits intoapache:masterfrom
sheetalshah1007 wants to merge 5 commits intoapache:masterfrom
Conversation
89a8541 to
26fe29a
Compare
mandarambawane
approved these changes
Dec 8, 2025
0a4f7b3 to
75f6190
Compare
af13a84 to
85e2798
Compare
85e2798 to
21db8c5
Compare
pinal-shah
reviewed
Apr 13, 2026
pinal-shah
reviewed
Apr 13, 2026
pinal-shah
reviewed
Apr 13, 2026
pinal-shah
reviewed
Apr 13, 2026
pinal-shah
reviewed
Apr 13, 2026
pinal-shah
reviewed
Apr 13, 2026
pinal-shah
requested changes
Apr 13, 2026
21db8c5 to
691348c
Compare
sheetalshah1007
commented
Apr 14, 2026
Contributor
Author
sheetalshah1007
left a comment
There was a problem hiding this comment.
@pinal-shah All review feedback has been addressed in code, comments, or review replies as appropriate. Please check
…le relationship types under a single attribute
691348c to
e911f9b
Compare
pinal-shah
requested changes
May 4, 2026
… relationship defs and value is a collection
pinal-shah
requested changes
May 5, 2026
pinal-shah
approved these changes
May 5, 2026
rkundam
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…le relationship types under a single attribute
What changes were proposed in this pull request?
Atlas handles relationships during import using
EntityGraphMapper. Earlier, it assumed that an attribute (liketables) would have only one relationship type for all its values. Because of this, when different table types (e.g., managed and external tables) were present, it picked a single relationship type for the entire list. This caused issues when the list contained mixed types, leading to incorrect handling during import and updates.This patch fixes how Atlas handles relationships during import when an attribute contains mixed relationship types.
It introduces a new method,
mapRelationshipAttributeWithMultipleTypes. Instead of processing all values together, Atlas now:In short, rather than treating all values the same, Atlas now correctly handles mixed types. This ensures accurate imports for cases where different table types (such as managed and external tables) coexist, avoiding errors or incorrect relationships.
How was this patch tested?
A dedicated test class,
EntityGraphMapperMultipleRelationshipTypesTest, is introduced to:Summary of Manual Testing:
Performance:
Ran large imports (up to 100K tables) on two clusters—with and without the fix—using the same data. Import times are very similar, indicating no performance impact..
Results:
1000 tables: ~3m40s → ~3m58s
10000 tables: ~37m → ~38m
50000 tables: ~3h03m → ~3h15m
100000 tables: ~6h44m → ~6h39m
Multiple relationship types:
Tested importing a mix of different table types (e.g., managed and external tables). Verified that all types are imported correctly and their relationships are created as expected.
Partition columns:
Tested partitioned tables to ensure partition columns and regular columns continue to be handled correctly after the fix.
Overall correctness:
Confirmed that all entities and relationships are created correctly, even when different types are mixed together.
Conclusion:
The fix works as expected and does not impact performance. It ensures correct handling of mixed relationship types during import.