Constructor and Description |
---|
ParserImpl(CatalogManager catalogManager,
java.util.function.Supplier<org.apache.flink.table.planner.calcite.FlinkPlannerImpl> validatorSupplier,
java.util.function.Supplier<CalciteParser> calciteParserSupplier,
java.util.function.Function<TableSchema,SqlExprToRexConverter> sqlExprToRexConverterCreator) |
Modifier and Type | Method and Description |
---|---|
List<Operation> |
parse(String statement)
Entry point for parsing SQL queries expressed as a String.
|
UnresolvedIdentifier |
parseIdentifier(String identifier)
Entry point for parsing SQL identifiers expressed as a String.
|
ResolvedExpression |
parseSqlExpression(String sqlExpression,
TableSchema inputSchema)
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, java.util.function.Function<TableSchema,SqlExprToRexConverter> sqlExprToRexConverterCreator)
public List<Operation> parse(String statement)
Parser
Note:If the created Operation
is a QueryOperation
it must be in a
form that will be understood by the Planner.translate(List)
method.
The produced Operation trees should already be validated.
public UnresolvedIdentifier parseIdentifier(String identifier)
Parser
parseIdentifier
in interface Parser
identifier
- the SQL identifier to parsepublic ResolvedExpression parseSqlExpression(String sqlExpression, TableSchema inputSchema)
Parser
parseSqlExpression
in interface Parser
sqlExpression
- the SQL expression to parseinputSchema
- the schema of the fields in sql expressionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.