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




repository/src/main/java/org/apache/atlas/query/Atlas.g4
Lines 21 (patched)
<https://reviews.apache.org/r/64476/#comment271895>

    I suggest we call the grammar AtlasDSL as there is opportunity for other 
grammars within Atlas for example to police the json format that corresponds to 
AtlasEntity and the like.



repository/src/main/java/org/apache/atlas/query/Atlas.g4
Lines 51 (patched)
<https://reviews.apache.org/r/64476/#comment271896>

    bad character - this is on a few lines below as well



repository/src/main/java/org/apache/atlas/query/Atlas.g4
Lines 133 (patched)
<https://reviews.apache.org/r/64476/#comment271897>

    I am wondering why this is here



repository/src/main/java/org/apache/atlas/query/Atlas.g4
Lines 200 (patched)
<https://reviews.apache.org/r/64476/#comment271898>

    If we support like we need to support a wild card or regex. I did not see 
an allowed wild card character in the grammar * or % maybe.



repository/src/main/java/org/apache/atlas/query/Atlas.g4
Lines 262 (patched)
<https://reviews.apache.org/r/64476/#comment271899>

    Did you decide you did not want to use something like 'WS: [ \n\t\r]+ -> 
skip;' which would mean you could get rid of all the whit space processing.


- David Radley


On Dec. 9, 2017, 1:34 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64476/
> -----------------------------------------------------------
> 
> (Updated Dec. 9, 2017, 1:34 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-2229
>     https://issues.apache.org/jira/browse/ATLAS-2229
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Atlas' DSL implementation was removed with the removal of the older type 
> system implementation, thus creating gap in functionality.
> 
> The patch implements Atlas' DSL using Antlr and a new from-scratch 
> implementation.
> 
> **Approach**
> Highlights of the implementation:
> - Does not use any of the old scala-based implementation of lexer and parser. 
> It uses Antlr library for this purpose.
> - Generated Gremlin queries are much simpler than the earlier implementation. 
> - Interface with rest of the application has been streamlined.
> 
> The Antlr's G4 (_Atlas.G4_) grammer file implements the DSL grammer. Antlr 
> code-generates the requisit lexer and parser.
> 
> The _DSLVisitor_ class is the concrete visitor implementation for the 
> generated syntax tree. 
> 
> _QueryProcessor_ maintains sequence of Gremlin clauses that are found during 
> the abstract syntax tree traversal. It uses _TypeRegistry_ for creating 
> qualified names.
> 
> Integration with rest of the application has had little impact.
> 
> 
> Diffs
> -----
> 
>   3party-licenses/Antlr-LICENSE PRE-CREATION 
>   pom.xml 4ee2d9ec 
>   repository/pom.xml 35b74e32 
>   repository/src/main/java/gen/org/apache/atlas/query/Atlas.tokens 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasBaseListener.java 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasBaseVisitor.java 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasLexer.java 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasLexer.tokens 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasListener.java 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasParser.java 
> PRE-CREATION 
>   repository/src/main/java/gen/org/apache/atlas/query/AtlasVisitor.java 
> PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  67aeb308 
>   repository/src/main/java/org/apache/atlas/query/Atlas.g4 PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/query/DSLVisitor.java 
> PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/query/Expressions.java 9e93ce41 
>   repository/src/main/java/org/apache/atlas/query/GremlinQuery.java fcb1f483 
>   repository/src/main/java/org/apache/atlas/query/GremlinTranslator.java 
> 5395ddd3 
>   repository/src/main/java/org/apache/atlas/query/QueryParser.java 1e5e5ff9 
>   repository/src/main/java/org/apache/atlas/query/QueryProcessor.java 
> 04cf0b4d 
>   repository/src/main/java/org/apache/atlas/query/SelectExpressionHelper.java 
> a8748efa 
>   
> repository/src/test/java/org/apache/atlas/repository/query/QueryProcessorTest.java
>  PRE-CREATION 
>   
> repository/src/test/java/org/apache/atlas/services/EntityDiscoveryServiceTest.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/64476/diff/1/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> _QueryProcessorTest_ implements the testing framework for DSL. It has 
> relevant code that setup up environment to verify various clauses implemented.
> 
> **Verification**
> Generated Gremlin queries have been verified using JanusGraph shell 
> customized for Atlas.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>

Reply via email to