augustoasilva commented on a change in pull request #11052:
URL: https://github.com/apache/arrow/pull/11052#discussion_r748232432
##########
File path: cpp/src/gandiva/precompiled/string_ops_test.cc
##########
@@ -1755,4 +1755,23 @@ TEST(TestStringOps, TestConvertToBigEndian) {
#endif
}
+TEST(TestStringOps, TestSoundex) {
+ gandiva::ExecutionContext ctx;
+ auto ctx_ptr = reinterpret_cast<int64_t>(&ctx);
+ int32_t out_len = 0;
+ const char* out;
+
+ out = soundex_utf8(ctx_ptr, "Miller", 6, &out_len);
+ EXPECT_EQ(std::string(out, out_len), "M460");
+
+ out = soundex_utf8(ctx_ptr, "abc", 3, &out_len);
+ EXPECT_EQ(std::string(out, out_len), "A120");
+
+ out = soundex_utf8(ctx_ptr, "test", 4, &out_len);
+ EXPECT_EQ(std::string(out, out_len), "T230");
Review comment:
Added this test cases and one more where a digit is int the middle of
the name, eg.: Mill3r
--
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]