Class ParserImpl
- java.lang.Object
-
- org.apache.flink.table.planner.delegation.ParserImpl
-
-
Constructor Summary
Constructors Constructor Description ParserImpl(CatalogManager catalogManager, Supplier<org.apache.flink.table.planner.calcite.FlinkPlannerImpl> validatorSupplier, Supplier<CalciteParser> calciteParserSupplier, RexFactory rexFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 usesExtendedParser
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.
-
-
-
Constructor Detail
-
ParserImpl
public ParserImpl(CatalogManager catalogManager, Supplier<org.apache.flink.table.planner.calcite.FlinkPlannerImpl> validatorSupplier, Supplier<CalciteParser> calciteParserSupplier, RexFactory rexFactory)
-
-
Method Detail
-
parse
public List<Operation> parse(String statement)
When parsing statement, it first usesExtendedParser
to parse statements. IfExtendedParser
fails to parse statement, it uses theCalciteParser
to parse statements.
-
parseIdentifier
public UnresolvedIdentifier parseIdentifier(String identifier)
Description copied from interface:Parser
Entry point for parsing SQL identifiers expressed as a String.- Specified by:
parseIdentifier
in interfaceParser
- Parameters:
identifier
- the SQL identifier to parse- Returns:
- parsed identifier
-
parseSqlExpression
public ResolvedExpression parseSqlExpression(String sqlExpression, RowType inputRowType, @Nullable LogicalType outputType)
Description copied from interface:Parser
Entry point for parsing SQL expressions expressed as a String.- Specified by:
parseSqlExpression
in interfaceParser
- Parameters:
sqlExpression
- the SQL expression to parseinputRowType
- the fields available in the SQL expressionoutputType
- expected top-level output type if available- Returns:
- resolved expression
-
getCompletionHints
public String[] getCompletionHints(String statement, int cursor)
Description copied from interface:Parser
Returns completion hints for the given statement at the given cursor position. The completion happens case insensitively.- Specified by:
getCompletionHints
in interfaceParser
- Parameters:
statement
- Partial or slightly incorrect SQL statementcursor
- cursor position- Returns:
- completion hints that fit at the current cursor position
-
getCatalogManager
public CatalogManager getCatalogManager()
-
-