Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/512#discussion_r65994802
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/expr/fn/impl/TestStringFunctions.java
---
@@ -114,6 +114,19 @@ public void testRegexpMatches() throws Exception {
}
@Test
+ public void testRegexpReplace() throws Exception {
+ testBuilder()
+ .sqlQuery("select regexp_replace(a, 'a|c', 'x') res1,
regexp_replace(b, 'd', 'zzz') res2 " +
+ "from (values('abc', 'bcd'), ('bcd', 'abc')) as t(a,b)")
+ .unOrdered()
+ .baselineColumns("res1", "res2")
+ .baselineValues("xbx", "bczzz")
+ .baselineValues("bxd", "abc")
+ .build()
+ .run();
+ }
+
--- End diff --
Can you add at least one case for the non-ASCII case, since one of the
issue this PR tries to address is the incorrect result for regex function over
non-ASCII input?
A new unit test case will help verify this PR fix the problem, and make
sure any new change will not regress this functionality.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---