LadyForest opened a new pull request #15087:
URL: https://github.com/apache/flink/pull/15087
## What is the purpose of the change
This pull request supports `SHOW [FULL] MODULES` syntax in Flink SqlParser,
TableEnvironment, and SqlCli.
## Brief change log
- 51f834cc7810369fcfac851f98e7f90c76a8bd8f supports SQL syntax in both
flink and hive parser.
- 36e0b4f7e907bb1c3edb0a0505a96a4ab9c80326 supports operation
transformation in blink planner.
- 96fe72dedeb6b036693a82f1a33a498f36ceb8c1 supports parsing `SHOW [FULL]
MODULES` in SqlCli. This commit changes how `SqlCommandParser` parsing `SHOW
MODULES`, from regex matching to `FlinkSqlParserImpl`(related to FLINK-17396).
This will lead the old planner not to support `SHOW MODULES` anymore, because
the old planner does not support the parsed `SqlShowModules` to be converted to
`ShowModulesOperation`. Besides, the `SqlCompleter` will fall back to using
TableAPI hint as well.
## Verifying this change
This change added tests and can be verified as follows:
- `FlinkSqlParserImplTest` and `FlinkHiveSqlParserImplTest` verify the SQL
syntax change behave as expected.
- `SqlToOperationConverterTest` and `TableEnvironmentTest` verify the
transformation behave as expected.
- `SqlCommandParserTest` verifies the Cli parser behave as expected.
- `CliClientTest` verifies the SQL completer behave as expected.
- `LocalExecutorITCase` verifies the execution phase work as expected.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (yes / **no**)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (yes / **no**
/ don't know)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** /
don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (**yes** / no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs
/ **not documented**)
- Docs will be updated after FLINK-21300 finish.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]