Class SqlCommandParserImpl
- java.lang.Object
-
- org.apache.flink.table.client.cli.parser.SqlCommandParserImpl
-
- All Implemented Interfaces:
SqlCommandParser
public class SqlCommandParserImpl extends Object implements SqlCommandParser
TheSqlCommandParserImplusesFlinkSqlParserImplTokenManagerto do lexical analysis. It cannot recognize special hive keywords yet because Hive has a slightly different vocabulary compared to Flink's, which causes theSqlCommandParserImplmisunderstanding some Hive's keywords to IDENTIFIER. But the ClientParser is only responsible to check whether the statement is completed or not and only cares about a few statements. So it's acceptable to tolerate the inaccuracy here.
-
-
Constructor Summary
Constructors Constructor Description SqlCommandParserImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Command>parseStatement(String statement)Parses given statement.
-
-
-
Method Detail
-
parseStatement
public Optional<Command> parseStatement(String statement) throws SqlExecutionException
Description copied from interface:SqlCommandParserParses given statement.- Specified by:
parseStatementin interfaceSqlCommandParser- Parameters:
statement- the sql client input to evaluate.- Returns:
- the optional value of
Commandparsed. It would be empty when the statement is "" or ";". - Throws:
SqlExecutionException- if any error happen while parsing or validating the statement.
-
-