This is an automated email from the ASF dual-hosted git repository. yaqian pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push: new 4c5f5fd KYLIN-4879 add UT 4c5f5fd is described below commit 4c5f5fdd02c5b424b02b9496163a05820e1b97ca Author: bingfeng.guo <546745...@qq.com> AuthorDate: Wed May 19 16:59:26 2021 +0800 KYLIN-4879 add UT --- .../test/java/org/apache/kylin/query/util/QueryUtilTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/query/src/test/java/org/apache/kylin/query/util/QueryUtilTest.java b/query/src/test/java/org/apache/kylin/query/util/QueryUtilTest.java index fb9a431..ab78c6d 100644 --- a/query/src/test/java/org/apache/kylin/query/util/QueryUtilTest.java +++ b/query/src/test/java/org/apache/kylin/query/util/QueryUtilTest.java @@ -351,6 +351,18 @@ public class QueryUtilTest extends LocalFileMetadataTestCase { Assert.assertEquals("select count(*)", QueryUtil.removeCommentInSql("select count(*) -- , --\t --/ --")); } + { + Assert.assertEquals("select 1\t''", QueryUtil.removeCommentInSql("select 1\t''/* comment */")); + } + { + Assert.assertEquals("select ' \t\n,\r/-'", QueryUtil.removeCommentInSql("select ' \t\n,\r/-'")); + } + { + Assert.assertEquals("select ' \t\n,\r/-'", QueryUtil.removeCommentInSql("select ' \t\n,\r/-'--comment")); + } + { + Assert.assertEquals("select ' \t\n,\r/-'", QueryUtil.removeCommentInSql("select ' \t\n,\r/-'/*comment*/")); + } } @Test