You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Ashutosh Mestry via Review Board <no...@reviews.apache.org> on 2020/10/01 17:14:03 UTC

Re: Review Request 72920: ATLAS-3965:Relationships with null values are missing in entity relationshipAttributes

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72920/#review221982
-----------------------------------------------------------


Ship it!




This seems to be fine:

MyClass aClass = null;
        if (aClass instanceof MyClass) {
            assertTrue(true);
        }

- Ashutosh Mestry


On Sept. 30, 2020, 10:53 p.m., Deep Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72920/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2020, 10:53 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, madhan, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3965
>     https://issues.apache.org/jira/browse/ATLAS-3965
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> In the get call, while reading the entity, we map entity's relationshipAttributes by relationship attributes defined in entityTypeDef.
> At this stage we ignore all null valued attributes, therefore all undefined attributes with Single cardinality gets ignored. However, attributes with Set or List cardinality are not ignored as they are not null by default but empty Arrays.
> 
> While mapping relationshipAttributes from entityTypeDef to response-entity, we should either ignore empty arrays as well or not ignore anything. In this Patch I have followed the second aproach which is not to ignore any thing.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java 00146b106 
> 
> 
> Diff: https://reviews.apache.org/r/72920/diff/1/
> 
> 
> Testing
> -------
> 
> Testing is done manually by importing Kafka topic.
> PreCommit Build Test has also passed. 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/44//
> 
> 
> Thanks,
> 
> Deep Singh
> 
>