Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-07 Thread Madhan Neethiraj

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




repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
Lines 1 (patched)


Please make sure to include Copyright text in each new file introduced.


- Madhan Neethiraj


On May 7, 2020, 8:03 a.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 7, 2020, 8:03 a.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  c70e8bfe8 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/5/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-07 Thread Madhan Neethiraj

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


Ship it!




Ship It!

- Madhan Neethiraj


On May 7, 2020, 8:03 a.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 7, 2020, 8:03 a.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  c70e8bfe8 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/5/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-07 Thread Damian Warszawski


> On May 6, 2020, 10:59 p.m., Madhan Neethiraj wrote:
> > graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
> > Line 215 (original), 215 (patched)
> > 
> >
> > Why is it necessary to switch to LinkedHashSet here?

Only LinkedHashSet maintains insertion order. Provided test for search with 
sortBy fails when underlying structure is HashSet.


> On May 6, 2020, 10:59 p.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
> > Line 203 (original), 204 (patched)
> > 
> >
> > Instead of ., I suggest the following:
> > 
> >   AtlasAttribute sortByAttribute = 
> > context.getEntityType().getAttribute(sortBy);
> >   
> >   if (sortByAttribute != null) {
> > AtlasGraphQuery.SortOrder qrySortOrder = sortOrder == 
> > SortOrder.ASCENDING ? ASC : DESC;
> > 
> > graphQuery.orderBy(sortByAttribute.getVertexPropertyName(), 
> > qrySortOrder)
> >   }
> > 
> > This will ensure that sortBy will work for system-attributes as well - 
> > like __timestamp, __modificationTimestamp.

Great suggestion. Fixed, thanks.


> On May 6, 2020, 10:59 p.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
> > Lines 367 (patched)
> > 
> >
> > I suggest to replace use of guava library class with JDK equivalent: 
> >   StreamSupport.stream(graphQuery.vertexIds().iterator(), false).count()

Fixed.


- Damian


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


On May 7, 2020, 8:03 a.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 7, 2020, 8:03 a.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  c70e8bfe8 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/5/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> 

Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-07 Thread Damian Warszawski

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

(Updated May 7, 2020, 8:03 a.m.)


Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon Rodrigues.


Repository: atlas


Description
---

EntitySearchProcessor fails when doing search by classification and specify 
orderBy attribute. The issue is that for graph query you cannot refer to 
attribute by name but need to provide absolute path to entity attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

this query fails with following exception:

 

```

{"exception":{"message":"Provided key does not exist: 
hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
 Provided key does not exist: hive_table.popularityScore\n\tat 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
 org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
orderBy(GraphCentricQueryBuilder.java:160)

```

 

When specify full reference to attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

it fails on validation stage

 

```

{"exception":{"message":"Attribute Table.popularityScore not found for type 
Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
 Attribute Table.popularityScore not found for type Table\n\tat 
org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)

```

Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776


Diffs (updated)
-

  
graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
 c70e8bfe8 
  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
1a7bf6b16 
  
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
 PRE-CREATION 
  repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 9aa554ad5 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 


Diff: https://reviews.apache.org/r/72459/diff/5/

Changes: https://reviews.apache.org/r/72459/diff/4-5/


Testing
---

tested on our dev env.


Thanks,

Damian Warszawski



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-06 Thread Madhan Neethiraj

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




graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
Line 215 (original), 215 (patched)


Why is it necessary to switch to LinkedHashSet here?



repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
Line 203 (original), 204 (patched)


Instead of ., I suggest the following:

  AtlasAttribute sortByAttribute = 
context.getEntityType().getAttribute(sortBy);
  
  if (sortByAttribute != null) {
AtlasGraphQuery.SortOrder qrySortOrder = sortOrder == 
SortOrder.ASCENDING ? ASC : DESC;

graphQuery.orderBy(sortByAttribute.getVertexPropertyName(), 
qrySortOrder)
  }

This will ensure that sortBy will work for system-attributes as well - like 
__timestamp, __modificationTimestamp.



repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
Lines 367 (patched)


I suggest to replace use of guava library class with JDK equivalent: 
  StreamSupport.stream(graphQuery.vertexIds().iterator(), false).count()


- Madhan Neethiraj


On May 5, 2020, 10:11 p.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 5, 2020, 10:11 p.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  c70e8bfe8 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/4/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-06 Thread Damian Warszawski


> On May 6, 2020, 6:49 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
> > Lines 369 (patched)
> > 
> >
> > typo maybe? => 'return -1'

As the return type is long, I made it more explicit with `l` suffix. It 
compiles properly.


- Damian


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


On May 5, 2020, 10:11 p.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 5, 2020, 10:11 p.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  c70e8bfe8 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/4/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-06 Thread Sarath Subramanian

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




repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
Lines 369 (patched)


typo maybe? => 'return -1'


- Sarath Subramanian


On May 5, 2020, 3:11 p.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 5, 2020, 3:11 p.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
>  c70e8bfe8 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/4/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-05 Thread Damian Warszawski

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

(Updated May 5, 2020, 10:11 p.m.)


Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon Rodrigues.


Changes
---

Fixed orderBy for graphQuery by replacing Hashset with LinkedHashSet to 
maintain insertion order.


Repository: atlas


Description
---

EntitySearchProcessor fails when doing search by classification and specify 
orderBy attribute. The issue is that for graph query you cannot refer to 
attribute by name but need to provide absolute path to entity attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

this query fails with following exception:

 

```

{"exception":{"message":"Provided key does not exist: 
hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
 Provided key does not exist: hive_table.popularityScore\n\tat 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
 org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
orderBy(GraphCentricQueryBuilder.java:160)

```

 

When specify full reference to attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

it fails on validation stage

 

```

{"exception":{"message":"Attribute Table.popularityScore not found for type 
Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
 Attribute Table.popularityScore not found for type Table\n\tat 
org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)

```

Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776


Diffs (updated)
-

  
graphdb/common/src/main/java/org/apache/atlas/repository/graphdb/tinkerpop/query/TinkerpopGraphQuery.java
 c70e8bfe8 
  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
1a7bf6b16 
  
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
 PRE-CREATION 
  repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 9aa554ad5 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 


Diff: https://reviews.apache.org/r/72459/diff/4/

Changes: https://reviews.apache.org/r/72459/diff/3-4/


Testing
---

tested on our dev env.


Thanks,

Damian Warszawski



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-05 Thread Damian Warszawski


> On May 2, 2020, 2:44 p.m., Bolke de Bruin wrote:
> > repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
> > Line 203 (original), 203 (patched)
> > 
> >
> > can you add a test please?

Added bunch of tests, introduce little fix to get right result count for 
graphQuery. There is kind of undeterminism while running test for sortBy. I 
think that implementation of sortBy on graphQuery never worked properly.


- Damian


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


On May 5, 2020, 3:26 p.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 5, 2020, 3:26 p.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
>   
> repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
>  PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 
> 9aa554ad5 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/3/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-05 Thread Damian Warszawski

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

(Updated May 5, 2020, 3:26 p.m.)


Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon Rodrigues.


Changes
---

optimize getResultCount() for graphQuery


Repository: atlas


Description
---

EntitySearchProcessor fails when doing search by classification and specify 
orderBy attribute. The issue is that for graph query you cannot refer to 
attribute by name but need to provide absolute path to entity attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

this query fails with following exception:

 

```

{"exception":{"message":"Provided key does not exist: 
hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
 Provided key does not exist: hive_table.popularityScore\n\tat 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
 org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
orderBy(GraphCentricQueryBuilder.java:160)

```

 

When specify full reference to attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

it fails on validation stage

 

```

{"exception":{"message":"Attribute Table.popularityScore not found for type 
Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
 Attribute Table.popularityScore not found for type Table\n\tat 
org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)

```

Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776


Diffs (updated)
-

  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
1a7bf6b16 
  
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
 PRE-CREATION 
  repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 9aa554ad5 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 


Diff: https://reviews.apache.org/r/72459/diff/3/

Changes: https://reviews.apache.org/r/72459/diff/2-3/


Testing
---

tested on our dev env.


Thanks,

Damian Warszawski



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-05 Thread Damian Warszawski

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

(Updated May 5, 2020, 11:45 a.m.)


Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon Rodrigues.


Repository: atlas


Description
---

EntitySearchProcessor fails when doing search by classification and specify 
orderBy attribute. The issue is that for graph query you cannot refer to 
attribute by name but need to provide absolute path to entity attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

this query fails with following exception:

 

```

{"exception":{"message":"Provided key does not exist: 
hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
 Provided key does not exist: hive_table.popularityScore\n\tat 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
 org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
orderBy(GraphCentricQueryBuilder.java:160)

```

 

When specify full reference to attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

it fails on validation stage

 

```

{"exception":{"message":"Attribute Table.popularityScore not found for type 
Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
 Attribute Table.popularityScore not found for type Table\n\tat 
org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)

```

Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776


Diffs (updated)
-

  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
1a7bf6b16 
  
repository/src/test/java/org/apache/atlas/discovery/EntitySearchProcessorTest.java
 PRE-CREATION 
  repository/src/test/java/org/apache/atlas/query/BasicTestSetup.java 9aa554ad5 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 


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

Changes: https://reviews.apache.org/r/72459/diff/1-2/


Testing
---

tested on our dev env.


Thanks,

Damian Warszawski



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-05 Thread Damian Warszawski

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

(Updated May 5, 2020, 11:45 a.m.)


Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon Rodrigues.


Repository: atlas


Description
---

EntitySearchProcessor fails when doing search by classification and specify 
orderBy attribute. The issue is that for graph query you cannot refer to 
attribute by name but need to provide absolute path to entity attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

this query fails with following exception:

 

```

{"exception":{"message":"Provided key does not exist: 
hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
 Provided key does not exist: hive_table.popularityScore\n\tat 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
 org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
orderBy(GraphCentricQueryBuilder.java:160)

```

 

When specify full reference to attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

it fails on validation stage

 

```

{"exception":{"message":"Attribute Table.popularityScore not found for type 
Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
 Attribute Table.popularityScore not found for type Table\n\tat 
org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)

```

Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776


Diffs
-

  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
1a7bf6b16 


Diff: https://reviews.apache.org/r/72459/diff/1/


Testing
---

tested on our dev env.


File Attachments (updated)


ATLAS-3776-1.patch
  
https://reviews.apache.org/media/uploaded/files/2020/05/05/96de2792-c75b-4440-8368-8791be7b005f__ATLAS-3776-1.patch


Thanks,

Damian Warszawski



Re: Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-02 Thread Bolke de Bruin

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




repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
Line 203 (original), 203 (patched)


can you add a test please?


- Bolke de Bruin


On May 1, 2020, 10:01 p.m., Damian Warszawski wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72459/
> ---
> 
> (Updated May 1, 2020, 10:01 p.m.)
> 
> 
> Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon 
> Rodrigues.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> EntitySearchProcessor fails when doing search by classification and specify 
> orderBy attribute. The issue is that for graph query you cannot refer to 
> attribute by name but need to provide absolute path to entity attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> this query fails with following exception:
> 
>  
> 
> ```
> 
> {"exception":{"message":"Provided key does not exist: 
> hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
>  Provided key does not exist: hive_table.popularityScore\n\tat 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
>  org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
> orderBy(GraphCentricQueryBuilder.java:160)
> 
> ```
> 
>  
> 
> When specify full reference to attribute e.g. 
> 
>  
> 
> ```
> 
> { "attributes": [ "description", "comment", "popularityScore" ], 
> "classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
> "limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
> "DESCENDING", "typeName": "hive_table" }
> ```
> 
> it fails on validation stage
> 
>  
> 
> ```
> 
> {"exception":{"message":"Attribute Table.popularityScore not found for type 
> Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
>  Attribute Table.popularityScore not found for type Table\n\tat 
> org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)
> 
> ```
> 
> Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  1a7bf6b16 
> 
> 
> Diff: https://reviews.apache.org/r/72459/diff/1/
> 
> 
> Testing
> ---
> 
> tested on our dev env.
> 
> 
> Thanks,
> 
> Damian Warszawski
> 
>



Review Request 72459: EntitySearchProcessor is failing on graph query with sortBy attribute.

2020-05-01 Thread Damian Warszawski

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

Review request for atlas, Bolke de Bruin, Madhan Neethiraj, and Nixon Rodrigues.


Repository: atlas


Description
---

EntitySearchProcessor fails when doing search by classification and specify 
orderBy attribute. The issue is that for graph query you cannot refer to 
attribute by name but need to provide absolute path to entity attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

this query fails with following exception:

 

```

{"exception":{"message":"Provided key does not exist: 
hive_table.popularityScore","class":"java.lang.IllegalArgumentException","stacktrace":"java.lang.IllegalArgumentException:
 Provided key does not exist: hive_table.popularityScore\n\tat 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)\n\tat
 org.janusgraph.graphdb.query.graph.GraphCentricQueryBuilder.
orderBy(GraphCentricQueryBuilder.java:160)

```

 

When specify full reference to attribute e.g. 

 

```

{ "attributes": [ "description", "comment", "popularityScore" ], 
"classification": "customer_NON_PII", "excludeDeletedEntities": "False", 
"limit": "", "offset": 100, "sortBy": "Table.popularityScore", "sortOrder": 
"DESCENDING", "typeName": "hive_table" }
```

it fails on validation stage

 

```

{"exception":{"message":"Attribute Table.popularityScore not found for type 
Table","class":"org.apache.atlas.exception.AtlasBaseException","stacktrace":"org.apache.atlas.exception.AtlasBaseException:
 Attribute Table.popularityScore not found for type Table\n\tat 
org.apache.atlas.discovery.SearchContext.validateAttributes(SearchContext.java:288)

```

Reference to JIRA https://issues.apache.org/jira/browse/ATLAS-3776


Diffs
-

  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
1a7bf6b16 


Diff: https://reviews.apache.org/r/72459/diff/1/


Testing
---

tested on our dev env.


Thanks,

Damian Warszawski