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




intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Lines 173 (patched)
<https://reviews.apache.org/r/72644/#comment310325>

    Consider including parent type name in the message, like:
      Invalid attribute name: {0}.{1}. Attribute already exists in parent type 
{}"



intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
Lines 509 (patched)
<https://reviews.apache.org/r/72644/#comment310326>

    Instead of checkForExistingAttributeInParentTypeDefs() method to verify 
this, I suggest to perform the validation in following methods:
      - AtlasEntityType.resolveReferences()
      - AtlasClassificationType.resolveReferences()


- Madhan Neethiraj


On July 7, 2020, 9:30 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72644/
> -----------------------------------------------------------
> 
> (Updated July 7, 2020, 9:30 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3872
>     https://issues.apache.org/jira/browse/ATLAS-3872
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Cause of the problem:
> Type-def Column is created by quick-start script.
> 
> Here in this case, Type-def Column has the attribute "name". And it has 
> property isOptional = true
> 
> Type-def Column is a child of Type-def Asset which also has the attribute 
> "name". And it has property isOptional = false
> 
> Now while creating Entity of Type-def Column from UI, it does not show 
> attribute "name" in the mandatory fields because for Type-def Column its 
> property isOptional = true
> 
> But while validating the attributes from server side we iterate through all 
> the attributes of Entity type (Including Parent's attributes)
> In this case, while validating Type-def Asset's attribute "name" (which has 
> property isOptional = false) we get an error because its value is sent as 
> "null" from UI side.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java a14e43a 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java 4a79b6f 
>   repository/src/test/resources/sales-v1-full.zip 
> 07afbf6ecae312a840b54cae5ab01335c513d180 
>   webapp/src/main/java/org/apache/atlas/examples/QuickStart.java 82a9f5c 
>   webapp/src/main/java/org/apache/atlas/examples/QuickStartV2.java d5cf9b7 
>   webapp/src/test/java/org/apache/atlas/web/integration/BaseResourceIT.java 
> 6800288 
>   
> webapp/src/test/java/org/apache/atlas/web/integration/TypesJerseyResourceIT.java
>  7c820e7 
> 
> 
> Diff: https://reviews.apache.org/r/72644/diff/3/
> 
> 
> Testing
> -------
> 
> PreCommit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/2007/console
> 
> PreCommit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/2014/console
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>

Reply via email to