snuyanzin commented on code in PR #22179:
URL: https://github.com/apache/flink/pull/22179#discussion_r1796852205


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlOtherOperationConverterTest.java:
##########
@@ -183,8 +184,37 @@ void testUseMultipleModules() {
         assertThat(useModulesOperation.asSummaryString()).isEqualTo("USE 
MODULES: [x, y, z]");
     }
 
+    @ParameterizedTest(name = "{index}: {0}")
+    @MethodSource("inputForShowCatalogsTest")
+    void testShowCatalogs(String sql, ShowCatalogsOperation expected, String 
expectedSummary) {
+        Operation operation = parse(sql);
+        
assertThat(operation).isInstanceOf(ShowCatalogsOperation.class).isEqualTo(expected);
+        assertThat(operation.asSummaryString()).isEqualTo(expectedSummary);
+    }
+
+    private static Stream<Arguments> inputForShowCatalogsTest() {
+        return Stream.of(
+                Arguments.of("show catalogs", new ShowCatalogsOperation(null), 
"SHOW CATALOGS"),
+                Arguments.of(
+                        "show catalogs like 'c%'",
+                        new 
ShowCatalogsOperation(ShowLikeOperator.of(LikeType.LIKE, "c%")),
+                        "SHOW CATALOGS LIKE 'c%'"),
+                Arguments.of(
+                        "show catalogs not like 'c%'",
+                        new 
ShowCatalogsOperation(ShowLikeOperator.of(LikeType.NOT_LIKE, "c%")),
+                        "SHOW CATALOGS NOT LIKE 'c%'"),
+                Arguments.of(
+                        "show catalogs ilike 'c%'",
+                        new 
ShowCatalogsOperation(ShowLikeOperator.of(LikeType.ILIKE, "c%")),
+                        "SHOW CATALOGS ILIKE 'c%'"),
+                Arguments.of(
+                        "show catalogs not ilike 'c%'",
+                        new 
ShowCatalogsOperation(ShowLikeOperator.of(LikeType.NOT_ILIKE, "c%")),
+                        "SHOW CATALOGS NOT ILIKE 'c%'"));
+    }
+
     @Test
-    void testShowModules() {
+    public void testShowModules() {

Review Comment:
   is there a reason we turn it to `public`?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to