You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "chenboat (via GitHub)" <gi...@apache.org> on 2023/06/20 21:09:06 UTC

[GitHub] [pinot] chenboat commented on a diff in pull request #10897: Fixes SQL wildcard escaping in LIKE queries

chenboat commented on code in PR #10897:
URL: https://github.com/apache/pinot/pull/10897#discussion_r1235861637


##########
pinot-common/src/test/java/org/apache/pinot/common/utils/RegexpPatternConverterUtilsTest.java:
##########
@@ -125,4 +125,27 @@ public void testTrailingSize2() {
     String regexpLikePattern = RegexpPatternConverterUtils.likeToRegexpLike("z%");
     assertEquals(regexpLikePattern, "^z");
   }
+
+  @Test
+  public void testEscapedWildcard1() {
+    String regexpLikePattern = RegexpPatternConverterUtils.likeToRegexpLike("a\\_b_\\");

Review Comment:
   Is it correct that "b_" is translated "b."? Even it is correctly, it is not obvious. Can you add some comments why it is converted as such?



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org