snuyanzin commented on a change in pull request #18874:
URL: https://github.com/apache/flink/pull/18874#discussion_r812611192
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlToOperationConverterTest.java
##########
@@ -1660,6 +1665,65 @@ public void testReset() {
assertThat(((ResetOperation)
operation2).getKey()).hasValue("test-key");
}
+ @Test
+ public void testHelpCommands() {
+ ExtendedParser extendedParser = new ExtendedParser();
+ Stream.of("HELP", "HELP;", "HELP ;", "HELP\t;", "HELP\n;")
+ .forEach(
+ command -> {
+ Operation operation1 =
+ extendedParser
+ .parse(command)
+ .orElseThrow(
+ () ->
+ new
RuntimeException(
+ "Fail to
parse '"
+ +
command
+ +
"'"));
+
assertThat(operation1).isInstanceOf(HelpOperation.class);
+ });
+ }
+
+ @Test
+ public void testClearCommands() {
+ ExtendedParser extendedParser = new ExtendedParser();
+ Stream.of("CLEAR", "CLEAR;", "CLEAR ;", "CLEAR\t;", "CLEAR\n;")
+ .forEach(
+ command -> {
+ Operation operation1 =
+ extendedParser
+ .parse(command)
+ .orElseThrow(
+ () ->
+ new
RuntimeException(
+ "Fail to
parse '"
+ +
command
+ +
"'"));
+
assertThat(operation1).isInstanceOf(ClearOperation.class);
+ });
+ }
+
+ @Test
+ public void testQuitCommands() {
+ ExtendedParser extendedParser = new ExtendedParser();
+ Stream.of(
+ "QUIT", "QUIT;", "QUIT ;", "QUIT\t;", "QUIT\n;",
"EXIT", "EXIT;", "EXIT ;",
+ "EXIT\t;", "EXIT\n;")
+ .forEach(
+ command -> {
+ Operation operation1 =
+ extendedParser
+ .parse(command)
+ .orElseThrow(
Review comment:
thanks, done
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]