Skip to content
  • Herman van Hovell's avatar
    [SPARK-13713][SQL] Migrate parser from ANTLR3 to ANTLR4 · 600c0b69
    Herman van Hovell authored
    ### What changes were proposed in this pull request?
    The current ANTLR3 parser is quite complex to maintain and suffers from code blow-ups. This PR introduces a new parser that is based on ANTLR4.
    
    This parser is based on the [Presto's SQL parser](https://github.com/facebook/presto/blob/master/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4). The current implementation can parse and create Catalyst and SQL plans. Large parts of the HiveQl DDL and some of the DML functionality is currently missing, the plan is to add this in follow-up PRs.
    
    This PR is a work in progress, and work needs to be done in the following area's:
    
    - [x] Error handling should be improved.
    - [x] Documentation should be improved.
    - [x] Multi-Insert needs to be tested.
    - [ ] Naming and package locations.
    
    ### How was this patch tested?
    
    Catalyst and SQL unit tests.
    
    Author: Herman van Hovell <hvanhovell@questtec.nl>
    
    Closes #11557 from hvanhovell/ngParser.
    600c0b69
This project is licensed under the Apache License 2.0. Learn more