SQL Parsing Framework

SQL Parser Framework in Spark SQL uses ANTLR to translate a SQL text to a data type, Expression, TableIdentifier or LogicalPlan.

The contract of the SQL Parser Framework is described by ParserInterface contract. The contract is then abstracted in AbstractSqlParser class so subclasses have to provide custom AstBuilder only.

There are two concrete implementations of AbstractSqlParser:

  1. SparkSqlParser that is the default parser of the SQL expressions into Spark’s types.

  2. CatalystSqlParser that is used to parse data types from their canonical string representation.

results matching ""

    No results matching ""