ViniciusSouzaRoque commented on code in PR #12391:
URL: https://github.com/apache/arrow/pull/12391#discussion_r927731273
##########
cpp/src/gandiva/precompiled/string_ops_test.cc:
##########
@@ -2702,4 +2702,26 @@ TEST(TestStringOps, TestInstr) {
result = instr_utf8(s1.c_str(), s1_len, s2.c_str(), s2_len);
EXPECT_EQ(result, 8);
}
+
+TEST(TestStringOps, TestFindInSet) {
+ gandiva::ExecutionContext ctx;
+ auto ctx_ptr = reinterpret_cast<int64_t>(&ctx);
+ int32_t result;
+ result = find_in_set_utf8_utf8(ctx_ptr, "EE", 2, ",A,B,C,D,EE,F", 13);
+ EXPECT_EQ(result, 6);
+ result = find_in_set_utf8_utf8(ctx_ptr, "A", 1, "A,B,C,D,EE,F", 12);
+ EXPECT_EQ(result, 1);
+ result = find_in_set_utf8_utf8(ctx_ptr, "AAAB", 4, "A,B,C,D,EE,F", 12);
+ EXPECT_EQ(result, 0);
+ result = find_in_set_utf8_utf8(ctx_ptr, "E,E", 3, "A,B,C,D,EE,F", 12);
+ EXPECT_EQ(result, 0);
+ result = find_in_set_utf8_utf8(ctx_ptr, "C", 1, "A,B,,,,,,,C,,,,,", 16);
Review Comment:
Done, the requested tests has working fine without any changes in code
--
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]