lincoln-lil commented on code in PR #23209: URL: https://github.com/apache/flink/pull/23209#discussion_r1302375790
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/delegation/ParserImplTest.java: ########## @@ -114,6 +115,18 @@ public void testCompletionTest() { verifySqlCompletion("SELECT a fram b", 10, new String[] {"FETCH", "FROM"}); } + @Test + public void testSqlLike() { Review Comment: Add a separate test class `SqlLikeUtilsTest` for this test because it's not related to the parser. ########## flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/CalcITCase.scala: ########## @@ -416,6 +416,30 @@ class CalcITCase extends BatchTestBase { row(3, 2L, "Hello world"), row(4, 3L, "Hello world, how are you?") )) + + val rows = Seq(row(3, "H.llo"), row(3, "Hello")) + val dataId = TestValuesTableFactory.registerData(rows) + + val ddl = + s""" + |CREATE TABLE MyTable ( + | a int, + | c string + |) WITH ( + | 'connector' = 'values', + | 'data-id' = '$dataId', + | 'bounded' = 'true' + |) + |""".stripMargin + tEnv.executeSql(ddl) + + checkResult( + s""" + |SELECT c FROM MyTable + | WHERE c LIKE 'H.llo' + |""".stripMargin, + Seq(row("H.llo")) + ) Review Comment: Also add sql case to cover the `similar to` & `not similar to` syntax -- 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