You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by chaitali <ch...@freestoneinfotech.com> on 2020/05/09 08:13:24 UTC

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

-----------------------------------------------------------
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


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

Posted by chaitali <ch...@freestoneinfotech.com>.

> 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)
> > <https://reviews.apache.org/r/72474/diff/7/?file=2231098#file2231098line584>
> >
> >     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

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
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)
<https://reviews.apache.org/r/72474/#comment309334>

    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)
<https://reviews.apache.org/r/72474/#comment309335>

    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

Posted by chaitali <ch...@freestoneinfotech.com>.

> On May 11, 2020, 6:02 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
> > Lines 591 (patched)
> > <https://reviews.apache.org/r/72474/diff/8/?file=2231131#file2231131line591>
> >
> >     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

Posted by chaitali <ch...@freestoneinfotech.com>.

> On May 11, 2020, 6:02 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
> > Lines 220 (patched)
> > <https://reviews.apache.org/r/72474/diff/8/?file=2231131#file2231131line220>
> >
> >     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)
> > <https://reviews.apache.org/r/72474/diff/8/?file=2231131#file2231131line591>
> >
> >     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

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
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)
<https://reviews.apache.org/r/72474/#comment309337>

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



repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Lines 220 (patched)
<https://reviews.apache.org/r/72474/#comment309336>

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



repository/src/main/java/org/apache/atlas/query/GremlinQueryComposer.java
Lines 591 (patched)
<https://reviews.apache.org/r/72474/#comment309338>

    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

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
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

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
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)
<https://reviews.apache.org/r/72474/#comment309460>

    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

Posted by Nixon Rodrigues <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
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)
<https://reviews.apache.org/r/72474/#comment309398>

    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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.
-----------------------------------------------------------
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

Posted by chaitali <ch...@freestoneinfotech.com>.

> 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)
> > <https://reviews.apache.org/r/72474/diff/6/?file=2231084#file2231084line163>
> >
> >     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

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
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)
<https://reviews.apache.org/r/72474/#comment309329>

    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)
<https://reviews.apache.org/r/72474/#comment309330>

    consider refactoring simialr to above.



repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
Lines 131 (patched)
<https://reviews.apache.org/r/72474/#comment309327>

    consider updating edgeDirection type to AtlasRelationshipEdgeDirection (enum)



repository/src/main/java/org/apache/atlas/query/IdentifierHelper.java
Line 160 (original), 163 (patched)
<https://reviews.apache.org/r/72474/#comment309328>

    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
> 
>