### _Why are the changes needed?_ resolve: #5505 Show available commands when users type 'HELP;' in the beeline. #### Solution: - Using `ExtendedParser` parse statement and return Operation of Flink engine. - Check whether the operation is HelpOperation or not. - dependency on `flink-table-planner-loader.jar`. #### **Why not using Flink SQL Client Parser(SqlCommandParserImpl) to obtain the Command enum?** Flink 1.16's approach: ``` val opt:Optional[Operation] = org.apache.flink.table.client.cli.SqlCommandParserImpl.parseCommand() check opt.get() instance of HelpOperation or not if yes return CliStrings.MESSAGE_HELP ``` Flink 1.17 & 1.18 ``` val opt: Optional[Command] = org.apache.flink.table.client.cli.parser.SqlCommandParserImpl.parseStatement() check opt.get() is Command.HELP or not if yes return CliStrings.MESSAGE_HELP ``` The `Command` class is added from Flink1.17; The `SqlCommandParserImpl` package is changed, and the method name is changed from Flink1.17; This approach requires distinguishing between different Flink versions and maintaining both implementations. It's more complicated, so abandoned. ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ Closes #5585 from YesOrNo828/help. Closes #5505 e73b15e43 [Xianxun Ye] [KYUUBI #5505] [FLINK] Add job,update,delete,truncate and call statements 5943dd072 [Xianxun Ye] [KYUUBI #5505] [FLINK] Add help messages fdc2db6ab [Xianxun Ye] [KYUUBI #5505] [FLINK] Support HELP command, fixed Pan's comments a728048fc [Xianxun Ye] [KYUUBI #5505] [FLINK] Support HELP command, fixed Pan's comments 6323cfb85 [Xianxun Ye] [KYUUBI #5505] [FLINK] Support HELP command Authored-by: Xianxun Ye <yesorno828423@gmail.com> Signed-off-by: Paul Lin <paullin3280@gmail.com> |
||
|---|---|---|
| .. | ||
| kyuubi-chat-engine | ||
| kyuubi-download | ||
| kyuubi-flink-sql-engine | ||
| kyuubi-hive-sql-engine | ||
| kyuubi-jdbc-engine | ||
| kyuubi-spark-sql-engine | ||
| kyuubi-trino-engine | ||