Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Currently, SqlCommandParser parse a statement to a corresponding SqlCommandCall, and CliClient will do different action based on different SqlCommandCall. However, if a new kind of statement is supported (such as SHOW CURRENT DDL, SHOW CREATE TABLE), we must implement them in planner and at the same time we need to add a new kind of SqlCommand, add new method in CliClient to execute the command in sql client. Moreover the implementation may be forgotten in sql client (such as FLINK-18059).
To improve this, I propose SqlCommandParser returns Operation, and CliClient executes Operation directly. Meanwhile we can unify the print style of different kind of Operations. After this is finished, we need not to change the sql client if a new kind of statement is supported, only if customized print style is needed.
Attachments
Issue Links
- is blocked by
-
FLINK-18550 use TableResult#collect to get select result for sql client
- Closed
-
FLINK-18789 Use TableEnvironment#executeSql to execute insert statement in sql client
- Closed
- is fixed by
-
FLINK-21463 Unify SQL Client parser and TableEnvironment parser
- Closed