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



I've updated the grammar with the suggested WS changes  WS: <> -> 
channel(HIDDEN).

Moving the WS to hidden channel over skip channel turns out to be faster
There's some rework done around identifiers as well

- Apoorv Naik


On Dec. 10, 2017, 9:09 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64476/
> -----------------------------------------------------------
> 
> (Updated Dec. 10, 2017, 9:09 p.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/gen/org/apache/atlas/query/antlr4/AtlasDSLLexer.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasDSLLexer.tokens 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasDSLParser.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasDSLParser.tokens 
> PRE-CREATION 
>   
> repository/gen/org/apache/atlas/query/antlr4/AtlasDSLParserBaseListener.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasDSLParserBaseVisitor.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasDSLParserListener.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasDSLParserVisitor.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasLexer.java PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasLexer.tokens PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasParser.java PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasParser.tokens 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasParserBaseListener.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasParserBaseVisitor.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasParserListener.java 
> PRE-CREATION 
>   repository/gen/org/apache/atlas/query/antlr4/AtlasParserVisitor.java 
> PRE-CREATION 
>   repository/pom.xml 35b74e32 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  67aeb308 
>   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/main/java/org/apache/atlas/query/antlr4/AtlasDSLLexer.g4 
> PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLLexer.java 
> PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLLexer.tokens 
> PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParser.g4 
> PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParser.java 
> PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParser.tokens 
> PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParserBaseVisitor.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLParserVisitor.java
>  PRE-CREATION 
>   
> 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/4/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> _QueryProcessorTest_ implements the testing framework for DSL. It has 
> relevant code that setup up environment to verify various clauses implemented.
> 
> **Functional testing**
> - Verified from web UI.
> - Verified using '_Saved Search_' feature.
> 
> **Additional verification**
> Generated Gremlin queries have been verified using JanusGraph shell 
> customized for Atlas.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>

Reply via email to