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.SqlIdentifier |
parseIdentifier(String identifier)
Parses a SQL string as an identifier into a
SqlIdentifier . |
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 statementpublic org.apache.calcite.sql.SqlIdentifier parseIdentifier(String identifier)
SqlIdentifier
.identifier
- a sql string to parse as an identifierSqlParserException
- if an exception is thrown when parsing the identifierCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.