public class CalciteParser extends Object
SqlParser
that does exception conversion and SqlNode
casting.Constructor and Description |
---|
CalciteParser(org.apache.calcite.sql.parser.SqlParser.Config config) |
Modifier and Type | Method and Description |
---|---|
org.apache.calcite.sql.SqlNode |
parse(String sql)
Parses a SQL statement into a
SqlNode . |
org.apache.calcite.sql.SqlNode |
parseExpression(String sqlExpression)
Parses a SQL expression into a
SqlNode . |
org.apache.calcite.sql.SqlIdentifier |
parseIdentifier(String identifier)
Parses a SQL string as an identifier into a
SqlIdentifier . |
org.apache.calcite.sql.SqlNodeList |
parseSqlList(String sql)
Parses a SQL string into a
SqlNodeList . |
public CalciteParser(org.apache.calcite.sql.parser.SqlParser.Config config)
public org.apache.calcite.sql.SqlNode parse(String sql)
SqlNode
. The SqlNode
is not yet validated.sql
- a sql string to parseSqlParserException
- if an exception is thrown when parsing the statementSqlParserEOFException
- if the statement is incompletepublic org.apache.calcite.sql.SqlNodeList parseSqlList(String sql)
SqlNodeList
. The SqlNodeList
is not yet validated.sql
- a sql string to parseSqlParserException
- if an exception is thrown when parsing the statementSqlParserEOFException
- if the statement is incompletepublic org.apache.calcite.sql.SqlNode parseExpression(String sqlExpression) throws SqlParserException
SqlNode
. The SqlNode
is not yet validated.sqlExpression
- a SQL expression string to parseSqlParserException
- if an exception is thrown when parsing the statementpublic org.apache.calcite.sql.SqlIdentifier parseIdentifier(String identifier) throws SqlParserException
SqlIdentifier
.identifier
- a sql string to parse as an identifierSqlParserException
- if an exception is thrown when parsing the identifierCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.