> On Dec. 11, 2017, 9:41 a.m., David Radley wrote:
> > repository/src/main/java/org/apache/atlas/query/antlr4/AtlasDSLLexer.java
> > Lines 1 (patched)
> > <https://reviews.apache.org/r/64476/diff/5/?file=1912411#file1912411line1>
> >
> >     I am wondering why we are checking in generated files. I suggeste these 
> > are generated as part of the build and then .gitignored

It's better to check in the files to avoid compile time overhead and adding 
more configuration in maven pom (might become a problem across different dev 
environments), antlr docs for maven suggest adding directives to the POM so 
that the src code can refer to the generated files (I found it to be an 
unnecessary overhead and comes in the way to dev time)


- Apoorv


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


On Dec. 11, 2017, 6:51 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64476/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2017, 6:51 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/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/5/
> 
> 
> 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