> On Sept. 13, 2022, 4:44 p.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
> > Lines 373 (patched)
> > <https://reviews.apache.org/r/74109/diff/3/?file=2269964#file2269964line373>
> >
> >     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?
> 
> Pinal Shah wrote:
>     Whenever "excludeHeaderAttributes":"true", response is bit different
>     
>     Example:
>     request: "attributes":["qualifiedName"], "excludeHeaderAttributes":"true"
>     response: {
>       "entities": [],
>       "attributes": {
>               "name": ["qualifiedName"],
>               "values": [
>                       ["sales@sys"],
>                       ["customer@sys"]
>               ]
>       }
>     }
>     
>     List<AtlasEntityHeader> entities,   will be blank
>     AttributeSearchResult   attributes, populate attribute values here.
>     
>     
>     Now case when
>     request: "attributes":["qualifiedName","db"], 
> "excludeHeaderAttributes":"true"
>     We need to fit below "db" value json, to AttributeSearchResult
>     "db": {
>               "guid": "6e44a899-320c-4026-a66a-d67a76ef7c41",
>               "typeName": "hive_db",
>               "uniqueAttributes": {
>                               "qualifiedName": "sys@cl1"
>               }
>        }

AtlasSearchResult.values is of type List<List<Object>>, hence should be able to 
handle obj-ref values as well - right?


- Madhan


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


On Sept. 14, 2022, 5:38 a.m., Pinal Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74109/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2022, 5:38 a.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
> 
> **Approach** : To overcome, we can add a flag to exclude other attributes and 
> add only selected attributes from 'attributes' field in the response
> 
> **Request**: {
>       "excludeDeletedEntities": true,
>       "includeSubClassifications": true,
>       "includeSubTypes": true,
>       "includeClassificationAttributes": true,
>       "limit": 25,
>       "offset": 0,
>       "typeName": "hdfs_path",
>     "attributes": ["path", "name"],
>       "excludeHeaderAttributes": "true"
>    }
>    
> **Response**: {
>       "queryType": "BASIC",
>       "searchParameters": {
>               "typeName": "hdfs_path",
>               "excludeDeletedEntities": true,
>               "includeClassificationAttributes": true,
>               "includeSubTypes": true,
>               "includeSubClassifications": true,
>               "limit": 25,
>               "offset": 0,
>               "attributes": ["path", "name"]
>       },
>       "attributes": {
>               "name": ["path", "name"],
>               "values": [
>                       ["/data/warehouse/customer", "customer"],
>                       ["/data/warehouse/sales", "sales"]
>               ]
>       },
>       "approximateCount": 2
> }
> 
> 
> 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/
> 
> Performance Readings: 
> Basic Search on 20K entities, limit 1000
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>

Reply via email to