public class ParserImpl extends Object implements Parser
Parser
that uses Calcite.Constructor and Description |
---|
ParserImpl(CatalogManager catalogManager,
java.util.function.Supplier<org.apache.flink.table.planner.calcite.FlinkPlannerImpl> validatorSupplier,
java.util.function.Supplier<CalciteParser> calciteParserSupplier,
RexFactory rexFactory) |
Modifier and Type | Method and Description |
---|---|
CatalogManager |
getCatalogManager() |
String[] |
getCompletionHints(String statement,
int cursor)
Returns completion hints for the given statement at the given cursor position.
|
List<Operation> |
parse(String statement)
When parsing statement, it first uses
ExtendedParser to parse statements. |
UnresolvedIdentifier |
parseIdentifier(String identifier)
Entry point for parsing SQL identifiers expressed as a String.
|
ResolvedExpression |
parseSqlExpression(String sqlExpression,
RowType inputRowType,
LogicalType outputType)
Entry point for parsing SQL expressions expressed as a String.
|
public ParserImpl(CatalogManager catalogManager, java.util.function.Supplier<org.apache.flink.table.planner.calcite.FlinkPlannerImpl> validatorSupplier, java.util.function.Supplier<CalciteParser> calciteParserSupplier, RexFactory rexFactory)
public List<Operation> parse(String statement)
ExtendedParser
to parse statements. If ExtendedParser
fails to parse statement, it uses the CalciteParser
to parse
statements.public UnresolvedIdentifier parseIdentifier(String identifier)
Parser
parseIdentifier
in interface Parser
identifier
- the SQL identifier to parsepublic ResolvedExpression parseSqlExpression(String sqlExpression, RowType inputRowType, @Nullable LogicalType outputType)
Parser
parseSqlExpression
in interface Parser
sqlExpression
- the SQL expression to parseinputRowType
- the fields available in the SQL expressionoutputType
- expected top-level output type if availablepublic String[] getCompletionHints(String statement, int cursor)
Parser
getCompletionHints
in interface Parser
statement
- Partial or slightly incorrect SQL statementcursor
- cursor positionpublic CatalogManager getCatalogManager()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.