Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-15 Thread Ashutosh Mestry via Review Board

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


Ship it!




Is this change needed at all? What is implemented is correct, since 
NullPointerException is caught and added to the errorList.

- Ashutosh Mestry


On May 15, 2020, 12:14 p.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 15, 2020, 12:14 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> Documentation added for this fiv in Advanced DSl search.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 129c20354 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/14/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-15 Thread chaitali

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

(Updated May 15, 2020, 12:14 p.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.
Documentation added for this fiv in Advanced DSl search.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
129c20354 


Diff: https://reviews.apache.org/r/72474/diff/14/

Changes: https://reviews.apache.org/r/72474/diff/13-14/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-14 Thread Ashutosh Mestry via Review Board

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




repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
Line 160 (original), 162 (patched)


This error message needs to be exception specific. It will not be 
NullPointerException always.


- Ashutosh Mestry


On May 14, 2020, 9:51 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 14, 2020, 9:51 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> Documentation added for this fiv in Advanced DSl search.
> 
> 
> Diffs
> -
> 
>   docs/src/documents/Search/SearchAdvanced.md 544c85ad2 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/13/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-14 Thread Sarath Subramanian

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


Ship it!




Ship It!

- Sarath Subramanian


On May 14, 2020, 2:51 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 14, 2020, 2:51 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> Documentation added for this fiv in Advanced DSl search.
> 
> 
> Diffs
> -
> 
>   docs/src/documents/Search/SearchAdvanced.md 544c85ad2 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/13/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-14 Thread Nixon Rodrigues

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


Ship it!




Ship It!

- Nixon Rodrigues


On May 14, 2020, 9:51 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 14, 2020, 9:51 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> Documentation added for this fiv in Advanced DSl search.
> 
> 
> Diffs
> -
> 
>   docs/src/documents/Search/SearchAdvanced.md 544c85ad2 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/13/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-14 Thread chaitali

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

(Updated May 14, 2020, 9:51 a.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.
Documentation added for this fiv in Advanced DSl search.


Diffs (updated)
-

  docs/src/documents/Search/SearchAdvanced.md 544c85ad2 
  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/13/

Changes: https://reviews.apache.org/r/72474/diff/12-13/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-14 Thread chaitali

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

(Updated May 14, 2020, 9:38 a.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description (updated)
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.
Documentation added for this fiv in Advanced DSl search.


Diffs
-

  docs/src/documents/Search/SearchAdvanced.md 544c85ad2 
  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/12/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-14 Thread chaitali

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

(Updated May 14, 2020, 9:03 a.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs (updated)
-

  docs/src/documents/Search/SearchAdvanced.md 544c85ad2 
  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/12/

Changes: https://reviews.apache.org/r/72474/diff/11-12/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-13 Thread chaitali

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

(Updated May 14, 2020, 5:46 a.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/11/

Changes: https://reviews.apache.org/r/72474/diff/10-11/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-13 Thread chaitali

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

(Updated May 13, 2020, 12:37 p.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/10/

Changes: https://reviews.apache.org/r/72474/diff/9-10/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-12 Thread Sarath Subramanian

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


Fix it, then Ship it!





repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java
Lines 127 (patched)


consider renaming the variable:

et => entityType
ret => attribute
direction => ret (return value should be ret to avoid confusion)


- Sarath Subramanian


On May 12, 2020, 6:11 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 12, 2020, 6:11 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/9/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-12 Thread chaitali


> On May 11, 2020, 6:02 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
> > Lines 591 (patched)
> > 
> >
> > same here. remove if/else condition
> 
> chaitali wrote:
> Here in Gremlin composer if we are receiving relationshipedgedirection 
> for the First edge when it comes to this IF condition where the logic is if 
> (direction is "IN" then set GremlinClause as "IN".
> and if direction is "OUT" then set GremlinClause as "OUT".)Hence am 
> executing it twice.

Removed repetitive if/else


- chaitali


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


On May 12, 2020, 1:11 p.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 12, 2020, 1:11 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/9/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-12 Thread chaitali

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

(Updated May 12, 2020, 1:11 p.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/9/

Changes: https://reviews.apache.org/r/72474/diff/8-9/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-12 Thread chaitali


> On May 11, 2020, 6:02 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
> > Lines 220 (patched)
> > 
> >
> > both if and else condition executes the same statement. please review.

Here in Gremlin composer if we are receiving relationshipedgedirection for the 
second edge when it comes to this IF condition then the logic is if (direction 
is "IN" then set GremlinClause as "OUT".
and if direction is "OUT" then set GremlinClause as "IN".)Hence am executing it 
twice.


> On May 11, 2020, 6:02 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
> > Lines 591 (patched)
> > 
> >
> > same here. remove if/else condition

Here in Gremlin composer if we are receiving relationshipedgedirection for the 
First edge when it comes to this IF condition where the logic is if (direction 
is "IN" then set GremlinClause as "IN".
and if direction is "OUT" then set GremlinClause as "OUT".)Hence am executing 
it twice.


- chaitali


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


On May 11, 2020, 5:56 p.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 11, 2020, 5:56 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/8/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-12 Thread chaitali


> On May 11, 2020, 5:48 p.m., Ashutosh Mestry wrote:
> > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
> > Line 578 (original), 584 (patched)
> > 
> >
> > Duplicate code.

Kindly refer to last two replies for Sarath's comments :both if and else 
condition executes the same statement. please review & same here. remove 
if/else condition


- chaitali


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


On May 11, 2020, 5:56 p.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 11, 2020, 5:56 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/8/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-11 Thread Sarath Subramanian

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




repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Line 217 (original), 217 (patched)


=> if (org.getEdgeDirection() != null)



repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Lines 220 (patched)


both if and else condition executes the same statement. please review.



repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Lines 591 (patched)


same here. remove if/else condition


- Sarath Subramanian


On May 11, 2020, 10:56 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 11, 2020, 10:56 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/8/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-11 Thread chaitali

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

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


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/8/

Changes: https://reviews.apache.org/r/72474/diff/7-8/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-11 Thread Ashutosh Mestry via Review Board

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




repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Line 217 (original), 217 (patched)


Can you use AtlasEdgeDirection instead of these literals. Also you could 
declare them as constants.



repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Line 578 (original), 584 (patched)


Duplicate code.


- Ashutosh Mestry


On May 11, 2020, 9:24 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 11, 2020, 9:24 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/7/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-11 Thread chaitali


> On May 11, 2020, 6:25 a.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
> > Line 160 (original), 163 (patched)
> > 
> >
> > why change ex.getMessage()? revert if not intended.
> 
> chaitali wrote:
> While running testcases no valid error was thrown when testcase caught 
> null which made it complicated to trace the error
> .So i have added this error message to notify

org.apache.atlas.exception.AtlasBaseException: Invalid DSL query: hive_db as d 
select d | Reason: . Please refer to Atlas DSL grammar for more information
at 
org.apache.atlas.query.AtlasDSL$Translator.processErrorList(AtlasDSL.java:143)
at 
org.apache.atlas.query.AtlasDSL$Translator.translate(AtlasDSL.java:130)
at 
org.apache.atlas.discovery.EntityDiscoveryService.toGremlinQuery(EntityDiscoveryService.java:736)

org.apache.atlas.exception.AtlasBaseException: Invalid DSL query: hive_db as d 
select d | Reason: NullPointerException. Please refer to Atlas DSL grammar for 
more information
at 
org.apache.atlas.query.AtlasDSL$Translator.processErrorList(AtlasDSL.java:143)
at 
org.apache.atlas.query.AtlasDSL$Translator.translate(AtlasDSL.java:130)
at 
org.apache.atlas.discovery.EntityDiscoveryService.toGremlinQuery(EntityDiscoveryService.java:736)


- chaitali


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


On May 11, 2020, 9:24 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 11, 2020, 9:24 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/7/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-11 Thread chaitali

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

(Updated May 11, 2020, 9:24 a.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs (updated)
-

  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/7/

Changes: https://reviews.apache.org/r/72474/diff/6-7/


Testing
---

TestCases added.


Thanks,

chaitali



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-11 Thread Sarath Subramanian

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




repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Lines 217 (patched)


consider refactoring to:

GremlinClause gremlinClauseForEdgeLabel = 
org.getEdgeDirection().equals("IN") ? GremlinClause.OUT : GremlinClause.IN;

add(gremlinClauseForEdgeLabel, org.getEdgeLabel());



repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Lines 583 (patched)


consider refactoring simialr to above.



repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
Lines 131 (patched)


consider updating edgeDirection type to AtlasRelationshipEdgeDirection 
(enum)



repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
Line 160 (original), 163 (patched)


why change ex.getMessage()? revert if not intended.


- Sarath Subramanian


On May 9, 2020, 1:13 a.m., chaitali wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72474/
> ---
> 
> (Updated May 9, 2020, 1:13 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
> Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3783
> https://issues.apache.org/jira/browse/ATLAS-3783
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Unable to get results for Dsl query eg;hive_column where 
> table.name="employee".
> Due to regression only one edge direction was giving results.
> This patch gives a fix for results for both relationship edge direction 
> queries.
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
> 04b177533 
>   repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
> 6ab61e16b 
>   repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
>   repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
> 2b34abff8 
>   repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 
> 0bbff2f46 
>   
> repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
> 6f4df88f0 
> 
> 
> Diff: https://reviews.apache.org/r/72474/diff/6/
> 
> 
> Testing
> ---
> 
> TestCases added.
> 
> 
> Thanks,
> 
> chaitali
> 
>



Re: Review Request 72474: ATLAS-3783 : DSL query search should return results for both the relationship edge directions

2020-05-09 Thread chaitali

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

(Updated May 9, 2020, 8:13 a.m.)


Review request for atlas, Ashutosh Mestry, Nikhil Bonte, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Unable to get results for Dsl query eg;hive_column where table.name="employee".
Due to regression only one edge direction was giving results.
This patch gives a fix for results for both relationship edge direction queries.


Diffs
-

  repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java 
04b177533 
  repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java 
6ab61e16b 
  repository/src/main/java/org/apache/atlas/query/Lookup.java 3c192d824 
  repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
2b34abff8 
  repository/src/test/java/org/apache/atlas/query/DSLQueriesTest.java 0bbff2f46 
  repository/src/test/java/org/apache/atlas/query/GremlinQueryComposerTest.java 
6f4df88f0 


Diff: https://reviews.apache.org/r/72474/diff/6/


Testing
---

TestCases added.


Thanks,

chaitali