public class SqlCommandParserImpl extends Object implements SqlCommandParser
SqlCommandParserImpl
uses FlinkSqlParserImplTokenManager
to do lexical
analysis. It cannot recognize special hive keywords yet because Hive has a slightly different
vocabulary compared to Flink's, which causes the SqlCommandParserImpl
misunderstanding
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 and Description |
---|
SqlCommandParserImpl() |
Modifier and Type | Method and Description |
---|---|
Optional<Command> |
parseStatement(String statement)
Parses given statement.
|
public Optional<Command> parseStatement(String statement) throws SqlExecutionException
SqlCommandParser
parseStatement
in interface SqlCommandParser
statement
- the sql client input to evaluate.Command
parsed. It would be empty when the statement is
"" or ";".SqlExecutionException
- if any error happen while parsing or validating the statement.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.