js8544 commented on code in PR #40970:
URL: https://github.com/apache/arrow/pull/40970#discussion_r1556818459
##########
cpp/src/gandiva/regex_functions_holder_test.cc:
##########
@@ -70,13 +72,23 @@ TEST_F(TestLikeHolder, TestMatchOne) {
}
TEST_F(TestLikeHolder, TestPcreSpecial) {
+ regex_op.set_dot_nl(true);
EXPECT_OK_AND_ASSIGN(auto const like_holder, LikeHolder::Make(".*ab_",
regex_op));
auto& like = *like_holder;
EXPECT_TRUE(like(".*abc")); // . and * aren't special in sql regex
EXPECT_FALSE(like("xxabc"));
}
+TEST_F(TestLikeHolder, TestPcreSpecialWithNewLine) {
+ regex_op.set_dot_nl(true);
+ EXPECT_OK_AND_ASSIGN(auto const like_holder, LikeHolder::Make("%Space1.%",
regex_op));
Review Comment:
Can you also add a simpler test case, e.g. 'abc\nd' LIKE '%abc%' is enough
to demonstate this change.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]