Re: Review Request 72182: ATLAS-3647 : System attribute search : isIncomplete attribute has 1, null as values

2020-03-10 Thread Nixon Rodrigues

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


Ship it!




Ship It!

- Nixon Rodrigues


On March 5, 2020, 9:50 a.m., mayank jain wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72182/
> ---
> 
> (Updated March 5, 2020, 9:50 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3647
> https://issues.apache.org/jira/browse/ATLAS-3647
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> In entity definition , 
> isIncomplete is null when is entity is complete
> isIncomplete is 1 when is entity is incomplete (shell/ghost entities)
> 
> when isIncomplete = false is expected to return all complete entities 
> (non-shell entities) but since isIncomplete is null , it doesn't return any 
> entity.
> 
> In system attributes search,
> isIncomplete takes conditions =, != , not null , null with values true , 
> false.
> 
> 
> Solution :
> Basically while creating normal entities isIncomplete attribute is nowhere 
> into consideration and also it only comes into picture for shell entities.
> 
> So, when we try searching for isIncomplete = false , the normal entities 
> which does not hold any value for this particular attribute we can directly 
> alter the graph query search with an OR condition.
> 
> i.e _isIncomplete = false OR _isIncomplete is null
> 
> This will return all the entities which  were once a shell entity and then 
> got updated to full entity and all the normal entities which never went into 
> the process of shell entities and have isIncomplete attribute as null.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 356363db0 
> 
> 
> Diff: https://reviews.apache.org/r/72182/diff/3/
> 
> 
> Testing
> ---
> 
> Tested the complete working  of isIncomplete attribute and it works fine.
> 
> 
> Thanks,
> 
> mayank jain
> 
>



Re: Review Request 72182: ATLAS-3647 : System attribute search : isIncomplete attribute has 1, null as values

2020-03-05 Thread Madhan Neethiraj

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


Ship it!




Ship It!

- Madhan Neethiraj


On March 5, 2020, 9:50 a.m., mayank jain wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72182/
> ---
> 
> (Updated March 5, 2020, 9:50 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3647
> https://issues.apache.org/jira/browse/ATLAS-3647
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> In entity definition , 
> isIncomplete is null when is entity is complete
> isIncomplete is 1 when is entity is incomplete (shell/ghost entities)
> 
> when isIncomplete = false is expected to return all complete entities 
> (non-shell entities) but since isIncomplete is null , it doesn't return any 
> entity.
> 
> In system attributes search,
> isIncomplete takes conditions =, != , not null , null with values true , 
> false.
> 
> 
> Solution :
> Basically while creating normal entities isIncomplete attribute is nowhere 
> into consideration and also it only comes into picture for shell entities.
> 
> So, when we try searching for isIncomplete = false , the normal entities 
> which does not hold any value for this particular attribute we can directly 
> alter the graph query search with an OR condition.
> 
> i.e _isIncomplete = false OR _isIncomplete is null
> 
> This will return all the entities which  were once a shell entity and then 
> got updated to full entity and all the normal entities which never went into 
> the process of shell entities and have isIncomplete attribute as null.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 356363db0 
> 
> 
> Diff: https://reviews.apache.org/r/72182/diff/3/
> 
> 
> Testing
> ---
> 
> Tested the complete working  of isIncomplete attribute and it works fine.
> 
> 
> Thanks,
> 
> mayank jain
> 
>



Re: Review Request 72182: ATLAS-3647 : System attribute search : isIncomplete attribute has 1, null as values

2020-03-05 Thread mayank jain

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

(Updated March 5, 2020, 9:50 a.m.)


Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
Subramanian.


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


Repository: atlas


Description
---

In entity definition , 
isIncomplete is null when is entity is complete
isIncomplete is 1 when is entity is incomplete (shell/ghost entities)

when isIncomplete = false is expected to return all complete entities 
(non-shell entities) but since isIncomplete is null , it doesn't return any 
entity.

In system attributes search,
isIncomplete takes conditions =, != , not null , null with values true , false.


Solution :
Basically while creating normal entities isIncomplete attribute is nowhere into 
consideration and also it only comes into picture for shell entities.

So, when we try searching for isIncomplete = false , the normal entities which 
does not hold any value for this particular attribute we can directly alter the 
graph query search with an OR condition.

i.e _isIncomplete = false OR _isIncomplete is null

This will return all the entities which  were once a shell entity and then got 
updated to full entity and all the normal entities which never went into the 
process of shell entities and have isIncomplete attribute as null.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
356363db0 


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

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


Testing
---

Tested the complete working  of isIncomplete attribute and it works fine.


Thanks,

mayank jain



Re: Review Request 72182: ATLAS-3647 : System attribute search : isIncomplete attribute has 1, null as values

2020-03-03 Thread mayank jain

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

(Updated March 3, 2020, 8:37 a.m.)


Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
Subramanian.


Changes
---

The mentioned review are been addresed in this patch.


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


Repository: atlas


Description
---

In entity definition , 
isIncomplete is null when is entity is complete
isIncomplete is 1 when is entity is incomplete (shell/ghost entities)

when isIncomplete = false is expected to return all complete entities 
(non-shell entities) but since isIncomplete is null , it doesn't return any 
entity.

In system attributes search,
isIncomplete takes conditions =, != , not null , null with values true , false.


Solution :
Basically while creating normal entities isIncomplete attribute is nowhere into 
consideration and also it only comes into picture for shell entities.

So, when we try searching for isIncomplete = false , the normal entities which 
does not hold any value for this particular attribute we can directly alter the 
graph query search with an OR condition.

i.e _isIncomplete = false OR _isIncomplete is null

This will return all the entities which  were once a shell entity and then got 
updated to full entity and all the normal entities which never went into the 
process of shell entities and have isIncomplete attribute as null.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
356363d 


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

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


Testing
---

Tested the complete working  of isIncomplete attribute and it works fine.


Thanks,

mayank jain



Re: Review Request 72182: ATLAS-3647 : System attribute search : isIncomplete attribute has 1, null as values

2020-03-02 Thread Madhan Neethiraj

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




repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
Lines 96 (patched)


Instead of introducing EDGE_LABEL_PREFIX_ISINCOMPLETE, please use 
Constants.IS_INCOMPLETE_PROPERTY_KEY.



repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
Lines 234 (patched)


'listCriterion' has one entry, which is not initialized to any condition. 
How does this work?

Instead of this approach, I suggest the following:
 - for Constants.IS_INCOMPLETE_PROPERTY_KEY attribute, only supported 
operators should be 'is null' and 'is not null'. Any other operator for this 
attribute should result in query to fail in validation - in 
SearchContext.validateAttributes(AtlasStructType, FilterCriteria)


- Madhan Neethiraj


On March 2, 2020, 1:46 p.m., mayank jain wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72182/
> ---
> 
> (Updated March 2, 2020, 1:46 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3647
> https://issues.apache.org/jira/browse/ATLAS-3647
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> In entity definition , 
> isIncomplete is null when is entity is complete
> isIncomplete is 1 when is entity is incomplete (shell/ghost entities)
> 
> when isIncomplete = false is expected to return all complete entities 
> (non-shell entities) but since isIncomplete is null , it doesn't return any 
> entity.
> 
> In system attributes search,
> isIncomplete takes conditions =, != , not null , null with values true , 
> false.
> 
> 
> Solution :
> Basically while creating normal entities isIncomplete attribute is nowhere 
> into consideration and also it only comes into picture for shell entities.
> 
> So, when we try searching for isIncomplete = false , the normal entities 
> which does not hold any value for this particular attribute we can directly 
> alter the graph query search with an OR condition.
> 
> i.e _isIncomplete = false OR _isIncomplete is null
> 
> This will return all the entities which  were once a shell entity and then 
> got updated to full entity and all the normal entities which never went into 
> the process of shell entities and have isIncomplete attribute as null.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 356363d 
> 
> 
> Diff: https://reviews.apache.org/r/72182/diff/1/
> 
> 
> Testing
> ---
> 
> Tested the complete working  of isIncomplete attribute and it works fine.
> 
> 
> Thanks,
> 
> mayank jain
> 
>



Re: Review Request 72182: ATLAS-3647 : System attribute search : isIncomplete attribute has 1, null as values

2020-03-02 Thread mayank jain

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

(Updated March 2, 2020, 1:46 p.m.)


Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
Subramanian.


Summary (updated)
-

ATLAS-3647 : System attribute search : isIncomplete attribute has 1,null as 
values


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


Repository: atlas


Description
---

In entity definition , 
isIncomplete is null when is entity is complete
isIncomplete is 1 when is entity is incomplete (shell/ghost entities)

when isIncomplete = false is expected to return all complete entities 
(non-shell entities) but since isIncomplete is null , it doesn't return any 
entity.

In system attributes search,
isIncomplete takes conditions =, != , not null , null with values true , false.


Solution :
Basically while creating normal entities isIncomplete attribute is nowhere into 
consideration and also it only comes into picture for shell entities.

So, when we try searching for isIncomplete = false , the normal entities which 
does not hold any value for this particular attribute we can directly alter the 
graph query search with an OR condition.

i.e _isIncomplete = false OR _isIncomplete is null

This will return all the entities which  were once a shell entity and then got 
updated to full entity and all the normal entities which never went into the 
process of shell entities and have isIncomplete attribute as null.


Diffs
-

  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
356363d 


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


Testing
---

Tested the complete working  of isIncomplete attribute and it works fine.


Thanks,

mayank jain