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

(Updated July 26, 2021, 4:26 p.m.)


Review request for atlas, Ashutosh Mestry, Jayendra Parab, Madhan Neethiraj, 
Nixon Rodrigues, and Sarath Subramanian.


Bugs: ATLAS-4362
    https://issues.apache.org/jira/browse/ATLAS-4362


Repository: atlas


Description
-------

**Problem**

- Searching with multiple entity/classification type like hive_table, 
hive_column is possible in basic search.
- Searching with multiple entity/classification type like hive_table, 
hive_column with common attributes like system Attributes or attribute to be 
search present in both the type is possible.
- But searching with multiple entity/classification type like hive_table, 
hive_column with its respective attributes like hive_table.tableType is not 
possible

**Changes**

- Field typeName (String) is added in SearchParameters.FilterCriteria
- Example: 
  "entityFilters": {
       "condition": "AND",
       "criterion": [{
         "attributeName": "tableType",
         "operator": "eq",
         "attributeValue": "Managed",
         "typeName": "hive_table"
       }]
   }

**Appraoch**

- If 'typeName' is added under filterCriteria, extra filter of *type* is added 
with *AND* condition to *attribute* filter
- Example:
("typeName": hive_table AND "hive_table.tableType": (Managed))
- To get the correct results, it is preferable to set typeName as 
'ALL_ENTITY_TYPES' 
- Classification is also handled same way


Diffs
-----

  intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java 
78fb4a48f 
  repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
01954d07e 
  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
f69dc4215 
  repository/src/test/java/org/apache/atlas/BasicTestSetup.java a1d7b62a5 
  
repository/src/test/java/org/apache/atlas/discovery/AtlasDiscoveryServiceTest.java
 a9fbd435a 
  
repository/src/test/java/org/apache/atlas/discovery/ClassificationSearchProcessorTest.java
 121dca9f5 
  
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
 764568915 


Diff: https://reviews.apache.org/r/73461/diff/2/


Testing
-------

added test cases


Thanks,

Pinal Shah

Reply via email to