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




intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Lines 179 (patched)
<https://reviews.apache.org/r/74109/#comment313457>

    "Referenced Attribute" => "Entity-reference attribute"



repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Lines 357 (patched)
<https://reviews.apache.org/r/74109/#comment313458>

    Consider moving #153 within validateAttributes(), to keep the context (in 
which validateAttributes is called) together:
    
    private void validateAttributes() {
      if (CollectionUtils.isNotEmpty(entityTypes) && 
CollectionUtils.isNotEmpty(searchParameters.getAttributes())) {
        ...
        
        if (searchParameters.getExcludeHeaderAttributes() && 
            (attributeType instanceof AtlasEntityType || attributeType 
instanceof AtlasBuiltInTypes.AtlasObjectIdType)) {
            throw new 
AtlasBaseException(AtlasErrorCode.REFERENCED_ATTRIBUTE_NOT_ALLOWED, attr, 
String.valueOf(searchParameters.getExcludeHeaderAttributes()));
        }
        
        ...
      }
    }



repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Lines 373 (patched)
<https://reviews.apache.org/r/74109/#comment313459>

    It is not clear why entity-ref attributes are not allowed when 
excludeHeaderAttributes is true. Is it for faster query response i.e., to avoid 
look up? Given the attribute is explicitly asked for, the caller should know 
the performance impact. Why not allow this case?


- Madhan Neethiraj


On Sept. 13, 2022, 1:46 p.m., Pinal Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74109/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2022, 1:46 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Radhika Kundam, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-4671
>     https://issues.apache.org/jira/browse/ATLAS-4671
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Issue** : Basic search has AtlasEntityHeader of each entity in the response.
> AtlasEntityHeader has many attributes including classification and terms. 
> hence for each attribute, it will request janusgraph to get all the header 
> attributes.
> 
> **Approach** : To overcome, we can add a flag to exclude other attributes and 
> add only selected attributes from 'attributes' field in the response
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 608342433 
>   
> intg/src/main/java/org/apache/atlas/model/discovery/QuickSearchParameters.java
>  79f5aae0d 
>   intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java 
> 78fb4a48f 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  8fbc22fa0 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 01954d07e 
>   
> repository/src/test/java/org/apache/atlas/discovery/AtlasDiscoveryServiceTest.java
>  fbc739652 
> 
> 
> Diff: https://reviews.apache.org/r/74109/diff/3/
> 
> 
> Testing
> -------
> 
> Unit testcases added
> Precommit : 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1215/
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>

Reply via email to